Skip to content

Commit

Permalink
Update tests and config for new test data
Browse files Browse the repository at this point in the history
See #94
  • Loading branch information
fsteeg authored and acka47 committed Nov 21, 2017
1 parent 9140468 commit 420809e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -25,4 +25,4 @@ app/transformation/input/*.xml
app/transformation/input/*.csv
test/transformation/output/*
.cache*
/bin/
/bin/
1 change: 0 additions & 1 deletion .settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,2 @@
eclipse.preferences.version=1
encoding//test/transformation/input/dbs.csv=ISO-8859-1
encoding/<project>=UTF-8
2 changes: 1 addition & 1 deletion test/controllers/IntegrationTest.java
Expand Up @@ -63,7 +63,7 @@ public void getByDbsIdHasIsilWillRedirect() {
@Test
public void getByDbsIdHasNoIsilNoRedirect() {
running(fakeApplication(), () -> {
Result result = route(fakeRequest(GET, "/organisations/DBS-AT700"));
Result result = route(fakeRequest(GET, "/organisations/DBS-AA022"));
assertThat(Helpers.status(result)).isEqualTo(Status.OK);
});
}
Expand Down
8 changes: 4 additions & 4 deletions test/index/TestNGram.java
Expand Up @@ -12,24 +12,24 @@ public class TestNGram extends ElasticsearchTest {
@Test
public void requestFullTerm() {
long total = search("name", "Stadtbibliothek").getHits().getTotalHits();
assertEquals("Request should return 1", 1, total);
assertEquals("Request should return correct total hits", 7, total);
}

@Test
public void requestNGram() {
long total = search("name", "Stadtbib").getHits().getTotalHits();
assertEquals("Request should return 1", 1, total);
assertEquals("Request should return correct total hits", 7, total);
}

@Test
public void requestLowerCase() {
long total = search("name", "stadtbibliothek").getHits().getTotalHits();
assertEquals("Request should return 1", 1, total);
assertEquals("Request should return correct total hits", 7, total);
}

@Test
public void requestUpperCase() {
long total = search("name", "STADTBIBLIOTHEK").getHits().getTotalHits();
assertEquals("Request should return 1", 1, total);
assertEquals("Request should return correct total hits", 7, total);
}
}
16 changes: 8 additions & 8 deletions test/index/TestStemming.java
Expand Up @@ -27,9 +27,9 @@ public class TestStemming extends ElasticsearchTest {
public static Collection<Object[]> data() {
// @formatter:off
return Arrays.asList(new Object[][] {
{ "_all", "köln", /*->*/ 3 },
{ "_all", "koeln", /*->*/ 3 },
{ "_all", "koln", /*->*/ 3 },
{ "_all", "köln", /*->*/ 2 },
{ "_all", "koeln", /*->*/ 2 },
{ "_all", "koln", /*->*/ 2 },
{ "name", "köln", /*->*/ 1 },
{ "name", "koeln", /*->*/ 1 },
{ "name", "koln", /*->*/ 1 },
Expand All @@ -42,11 +42,11 @@ public static Collection<Object[]> data() {
{ "fundertype.label.de", "Körperschaft", /*->*/ 2 },
{ "fundertype.label.de", "Koerperschaft", /*->*/ 2 },
{ "fundertype.label.de", "Korperschaft", /*->*/ 2 },
{ "_all", "straße", /*->*/ 2 },
{ "_all", "strasse", /*->*/ 2 },
{ "name", "Preußischer", /*->*/ 1 },
{ "name", "Preussischer", /*->*/ 1 },
{ "name", "preuss", /*->*/ 1 }});
{ "_all", "straße", /*->*/ 1 },
{ "_all", "strasse", /*->*/ 1 },
{ "name", "Preußischer", /*->*/ 2 },
{ "name", "Preussischer", /*->*/ 2 },
{ "name", "preuss", /*->*/ 2 }});
} // @formatter:on

private String field;
Expand Down

0 comments on commit 420809e

Please sign in to comment.