mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-07-31 17:38:33 +00:00
Initial tests
* Add initial tests for config aggregation * Update AbstractTransformerControllerTest to use the new engine config names
This commit is contained in:
@@ -338,15 +338,24 @@ public abstract class AbstractTransformerControllerTest
|
||||
assertEquals(BAD_REQUEST.value(), transformReply.getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return transformer specific engine config name
|
||||
*/
|
||||
public String getEngineConfigName()
|
||||
{
|
||||
return "engine_config.json";
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTransformConfigInfo() throws Exception
|
||||
{
|
||||
TransformConfig expectedTransformConfig = objectMapper
|
||||
.readValue(new ClassPathResource("engine_config.json").getFile(),
|
||||
.readValue(new ClassPathResource(getEngineConfigName()).getFile(),
|
||||
TransformConfig.class);
|
||||
|
||||
ReflectionTestUtils.setField(transformRegistry, "engineConfig",
|
||||
new ClassPathResource("engine_config.json"));
|
||||
new ClassPathResource(getEngineConfigName()));
|
||||
|
||||
String response = mockMvc
|
||||
.perform(MockMvcRequestBuilders.get("/transform/config"))
|
||||
@@ -355,7 +364,6 @@ public abstract class AbstractTransformerControllerTest
|
||||
.andReturn().getResponse().getContentAsString();
|
||||
|
||||
TransformConfig transformConfig = objectMapper.readValue(response, TransformConfig.class);
|
||||
|
||||
assertEquals(expectedTransformConfig, transformConfig);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user