Skip to content

Commit 49953d7

Browse files
WS-2744: add test for genre
1 parent 9978b54 commit 49953d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

json/src/test/java/com/basistech/rosette/apimodel/PolymorphicRequestTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,14 @@ public void init() {
3838
@Test
3939
void testRequestTypes() throws Exception {
4040

41-
String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}";
41+
String json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"genre\": \"news\"}";
4242
Request request = mapper.readValue(json, new TypeReference<DocumentRequest<EntitiesOptions>>() { });
4343
assertEquals(DOC_REQUEST, request.getClass().getName());
4444

45+
json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"calculateConfidence\": true}}";
46+
request = mapper.readValue(json, new TypeReference<DocumentRequest<EntitiesOptions>>() { });
47+
assertEquals(DOC_REQUEST, request.getClass().getName());
48+
4549
json = "{\"content\": \"what is my type\", \"language\": \"eng\", \"options\": {\"includeDBpediaTypes\": true, \"calculateConfidence\": true}}";
4650
request = mapper.readValue(json, new TypeReference<DocumentRequest<EntitiesOptions>>() { });
4751
assertEquals(DOC_REQUEST, request.getClass().getName());

0 commit comments

Comments
 (0)