Merge branch 'ATS-675_aio_transformer' of github.com:Alfresco/alfresco-transform-core into ATS-675_aio_transformer

This commit is contained in:
David Edwards
2020-04-07 08:54:28 +01:00
9 changed files with 131 additions and 35 deletions

View File

@@ -340,15 +340,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"))
@@ -357,7 +366,6 @@ public abstract class AbstractTransformerControllerTest
.andReturn().getResponse().getContentAsString();
TransformConfig transformConfig = objectMapper.readValue(response, TransformConfig.class);
assertEquals(expectedTransformConfig, transformConfig);
}