Package net.n2oapp.framework.config.test
Class JsonMetadataTester
- java.lang.Object
-
- net.n2oapp.framework.config.test.JsonMetadataTester
-
public class JsonMetadataTester extends Object
Инструмент для тестирования сборки json метаданных из xml
-
-
Constructor Summary
Constructors Constructor Description JsonMetadataTester(N2oApplicationBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck(String route, Class<? extends Compiled> compiledClass, org.springframework.core.io.Resource jsonUri, String xmlCutPath, String jsonCutPath, List<String> jsonExcludePath, Map<String,Object> jsonChangeValuePaths, Map<String,String> jsonChangeNodePaths, DataSet queryParams)Проверить, что xml преобразуется в json эквивалентный исходномуvoidcheck(DataSet source, CompileContext<?,?> context, DataSet data, String xmlCutPath, List<String> jsonExcludePath)voidcheck(org.springframework.core.io.Resource jsonUri, CompileContext<?,?> context, DataSet data, String xmlCutPath, String jsonCutPath, List<String> jsonExcludePath, Map<String,Object> jsonChangeValuePaths, Map<String,String> jsonChangeNodePaths)voidsetMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)voidsetPipelineFunc(PipelineFunction<ReadCompileBindTerminalPipeline> pipelineFunc)voidsetPrintJsonOnFail(boolean printJsonOnFail)
-
-
-
Constructor Detail
-
JsonMetadataTester
public JsonMetadataTester(N2oApplicationBuilder builder)
-
-
Method Detail
-
check
public void check(String route, Class<? extends Compiled> compiledClass, org.springframework.core.io.Resource jsonUri, String xmlCutPath, String jsonCutPath, List<String> jsonExcludePath, Map<String,Object> jsonChangeValuePaths, Map<String,String> jsonChangeNodePaths, DataSet queryParams) throws IOException
Проверить, что xml преобразуется в json эквивалентный исходному- Parameters:
route- Маршрут до метаданныхjsonUri- Путь к json файлуxmlCutPath- Путь для проверки эквивалентности внутри json полученного из xmljsonCutPath- Путь внутри json для проверки эквивалентностиqueryParams-- Throws:
IOException
-
check
public void check(org.springframework.core.io.Resource jsonUri, CompileContext<?,?> context, DataSet data, String xmlCutPath, String jsonCutPath, List<String> jsonExcludePath, Map<String,Object> jsonChangeValuePaths, Map<String,String> jsonChangeNodePaths) throws IOException- Throws:
IOException
-
check
public void check(DataSet source, CompileContext<?,?> context, DataSet data, String xmlCutPath, List<String> jsonExcludePath) throws IOException
- Throws:
IOException
-
setPipelineFunc
public void setPipelineFunc(PipelineFunction<ReadCompileBindTerminalPipeline> pipelineFunc)
-
setMapper
public void setMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
setPrintJsonOnFail
public void setPrintJsonOnFail(boolean printJsonOnFail)
-
-