Initial tests

* Add initial tests for config aggregation
* Update AbstractTransformerControllerTest to use the new engine config names
This commit is contained in:
Erik Knizat
2020-04-06 16:02:01 +01:00
parent c5a552066a
commit 952cfef306
9 changed files with 131 additions and 35 deletions

View File

@@ -116,6 +116,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
@WebMvcTest(TikaController.class)
public class TikaControllerTest extends AbstractTransformerControllerTest
{
private static final String ENGINE_CONFIG_NAME = "tika_engine_config.json";
private static final String EXPECTED_XHTML_CONTENT_CONTAINS = "<p>The quick brown fox jumps over the lazy dog</p>";
private static final String EXPECTED_TEXT_CONTENT_CONTAINS = "The quick brown fox jumps over the lazy dog";
private static final String EXPECTED_MSG_CONTENT_CONTAINS = "Recipients\n" +
@@ -146,6 +147,12 @@ public class TikaControllerTest extends AbstractTransformerControllerTest
targetExtension = "txt";
}
@Override
public String getEngineConfigName()
{
return ENGINE_CONFIG_NAME;
}
@Override
protected void mockTransformCommand(String sourceExtension,
String targetExtension, String sourceMimetype,