Added default foundry for structure layer.
Change-Id: I808745f3e4ae83157204a13061bd3f6b2d6e799c
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java
index bd56477..ffe1c51 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java
@@ -50,7 +50,7 @@
@Test
public void testProperties () {
- assertEquals("token layer does not match", "opennlp", config.getDefault_token());
+ assertEquals("token layer does not match", "opennlp", config.getDefault_orthography());
assertEquals("token expiration does not match",
TimeUtils.convertTimeToSeconds("1D"), config.getLongTokenTTL());
}
diff --git a/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java
index ee86fc2..ce2f6ad 100644
--- a/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java
@@ -114,7 +114,7 @@
public void testDefaultLayerMapperThrowsNoException () {
assertEquals(config.getDefault_lemma(), m.findFoundry("lemma"));
assertEquals(config.getDefault_pos(), m.findFoundry("pos"));
- assertEquals(config.getDefault_token(), m.findFoundry("surface"));
+ assertEquals(config.getDefault_orthography(), m.findFoundry("surface"));
assertEquals(config.getDefault_dep(), m.findFoundry("d"));
assertEquals(config.getDefault_const(), m.findFoundry("c"));
}
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java
index 29c5890..c04aee1 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java
@@ -46,8 +46,8 @@
@Test
public void testCreateSettingWithJson () throws KustvaktException {
String json =
- "{\"pos-foundry\":\"opennlp\",\"metadata\":\"author title "
- + "textSigle availability\",\"resultPerPage\":25}";
+ "{\"pos-foundry\":\"opennlp\",\"metadata\":[\"author\", \"title\","
+ + "\"textSigle\", \"availability\"],\"resultPerPage\":25}";
ClientResponse response = resource().path(API_VERSION)
.path("~" + username).path("setting")
@@ -59,7 +59,8 @@
assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
int numOfResult = 25;
- String metadata = "author title textSigle availability";
+ String metadata = "[\"author\",\"title\",\"textSigle\","
+ + "\"availability\"]";
testRetrieveSettings(username, "opennlp", numOfResult, metadata);
@@ -254,6 +255,7 @@
.get(ClientResponse.class);
String entity = response.getEntity(String.class);
+ System.out.println(entity);
JsonNode node = JsonUtils.readTree(entity);
if (posFoundry == null) {
assertTrue(node.at("/pos-foundry").isMissingNode());
@@ -262,7 +264,7 @@
assertEquals(posFoundry, node.at("/pos-foundry").asText());
}
assertEquals(numOfResult, node.at("/resultPerPage").asInt());
- assertEquals(metadata, node.at("/metadata").asText());
+ assertEquals(metadata, node.at("/metadata").toString());
}
}
diff --git a/full/src/test/resources/kustvakt-test.conf b/full/src/test/resources/kustvakt-test.conf
index b3d2985..7587bc9 100644
--- a/full/src/test/resources/kustvakt-test.conf
+++ b/full/src/test/resources/kustvakt-test.conf
@@ -36,6 +36,7 @@
default.foundry.dependency = malt
default.foundry.constituent = corenlp
default.foundry.morphology = marmot
+default.foundry.surface = base
## delete configuration (default hard)
# delete.auto.group = hard