Skip to content

Commit

Permalink
Merge pull request #13 from ubtue/anutz
Browse files Browse the repository at this point in the history
changed function calls in testing part
  • Loading branch information
mtrojan-ub authored Apr 19, 2022
2 parents df55df9 + 55af407 commit c96f184
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/org/vufind/solr/handler/BibDBTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testRecordCount()
IndexSearcher searcher = searcherRef.get();
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
try {
assertEquals(titleCount, bibDbForTitle.recordCount(title));
assertEquals(titleCount, bibDbForTitle.recordCount(title, null));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand All @@ -135,7 +135,7 @@ public void testMatchingIDs()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
List<String> ids = bibDbForTitle.matchingIDs(title, "id", 10).get("id")
List<String> ids = bibDbForTitle.matchingIDs(title, "id", 10, null).get("id")
.stream()
.flatMap(Collection::stream)
.collect(Collectors.toList());
Expand Down Expand Up @@ -163,7 +163,7 @@ public void testMatchingExtras()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
Map<String, List<Collection<String>>> extrasMap = bibDbForTitle.matchingExtras(title, extras, maxBibs);
Map<String, List<Collection<String>>> extrasMap = bibDbForTitle.matchingExtras(title, extras, maxBibs, null);
List<String> ids = extrasMap.get("id")
.stream()
.flatMap(Collection::stream)
Expand Down Expand Up @@ -196,7 +196,7 @@ public void testMatchingExtras_noLimit()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
List<String> ids = bibDbForTitle.matchingExtras(title, "id", maxBibs).get("id")
List<String> ids = bibDbForTitle.matchingExtras(title, "id", maxBibs, null).get("id")
.stream()
.flatMap(Collection::stream)
.collect(Collectors.toList());
Expand All @@ -222,7 +222,7 @@ public void testMatchingExtras_smallLimit()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
List<String> ids = bibDbForTitle.matchingExtras(title, "id", maxBibs).get("id")
List<String> ids = bibDbForTitle.matchingExtras(title, "id", maxBibs, null).get("id")
.stream()
.flatMap(Collection::stream)
.collect(Collectors.toList());
Expand All @@ -247,7 +247,7 @@ public void testMatchingExtras_noExtras()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
assertNull(bibDbForTitle.matchingExtras(title, null, 0));
assertNull(bibDbForTitle.matchingExtras(title, null, 0, null));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand All @@ -271,7 +271,7 @@ public void testMatchingFields()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
Map<String, Collection<String>> extrasMap = bibDbForTitle.matchingFields(title, extras, maxBibs);
Map<String, Collection<String>> extrasMap = bibDbForTitle.matchingFields(title, extras, maxBibs, null);
Collection<String> ids = extrasMap.get("id");
//Log.info("extrasMap: %s", extrasMap);
//Log.info("ids: %s", ids);
Expand Down Expand Up @@ -302,7 +302,7 @@ public void testMatchingFields_noLimit()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
Collection<String> ids = bibDbForTitle.matchingFields(title, "id", maxBibs).get("id");
Collection<String> ids = bibDbForTitle.matchingFields(title, "id", maxBibs, null).get("id");
assertEquals(idCount, ids.size());
} catch (Exception e) {
// TODO Auto-generated catch block
Expand All @@ -325,7 +325,7 @@ public void testMatchingFields_smallLimit()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
Collection<String> ids = bibDbForTitle.matchingFields(title, "id", maxBibs).get("id");
Collection<String> ids = bibDbForTitle.matchingFields(title, "id", maxBibs, null).get("id");
assertEquals(maxBibs, ids.size());
} catch (Exception e) {
// TODO Auto-generated catch block
Expand All @@ -347,7 +347,7 @@ public void testMatchingFields_noFields()
IndexSearcher searcher = searcherRef.get();
try {
BibDB bibDbForTitle = new BibDB(searcher, "title_fullStr");
assertNull(bibDbForTitle.matchingFields(title, null, 0));
assertNull(bibDbForTitle.matchingFields(title, null, 0, null));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down

0 comments on commit c96f184

Please sign in to comment.