diff options
Diffstat (limited to 'tools/model-generator/src/test/java')
2 files changed, 11 insertions, 10 deletions
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java index 164f187cc..14ff284b9 100644 --- a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java +++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java @@ -68,7 +68,8 @@ public class SchemaUtilsTest { */ @BeforeClass public static void readSimpleModel() throws IOException, ApexModelException { - String avroModelString = TextFileUtils.getTextFileAsString("src/test/resources/models/AvroModel.json"); + String avroModelString = TextFileUtils + .getTextFileAsString("target/examples/models/pcvs/vpnsla/PCVS-VpnSla.json"); final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); avroModel = modelReader.read(new ByteArrayInputStream(avroModelString.getBytes())); diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java index 170004e7c..aaff84eeb 100644 --- a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java +++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java @@ -102,37 +102,37 @@ public class Model2CliTest { @Test public void testModel2CliAvro() throws IOException { - testModel2CliModel("AvroModel"); + testModel2CliModel("target/examples/models/pcvs/vpnsla", "PCVS-VpnSla"); } @Test public void testModel2CliAadm() throws IOException { - testModel2CliModel("AADMPolicyModel"); + testModel2CliModel("target/examples/models/AADM", "AADMPolicyModel"); } @Test public void testModel2CliAnomaly() { - testModel2CliModel("AnomalyDetectionPolicyModel"); + testModel2CliModel("target/examples/models/Adaptive", "AnomalyDetectionPolicyModel"); } @Test public void testModel2CliAutoLearn() { - testModel2CliModel("AutoLearnPolicyModel"); + testModel2CliModel("target/examples/models/Adaptive", "AutoLearnPolicyModel"); } @Test public void testModel2CliJms() { - testModel2CliModel("JMSSamplePolicyModel"); + testModel2CliModel("target/examples/models/JMS", "JMSTestModel"); } @Test public void testModel2CliMfp() { - testModel2CliModel("MyFirstPolicyModel"); + testModel2CliModel("target/examples/models/MyFirstPolicy/2", "MyFirstPolicyModel"); } @Test public void testModel2CliSample() { - testModel2CliModel("SamplePolicyModelJAVASCRIPT"); + testModel2CliModel("target/examples/models/SampleDomain", "SamplePolicyModelJAVASCRIPT"); } /** @@ -158,13 +158,13 @@ public class Model2CliTest { * * @param modelName the name of the model file */ - private void testModel2CliModel(String modelName) { + private void testModel2CliModel(final String modelPath, final String modelName) { try { File tempFile = File.createTempFile(modelName, ".apex"); tempFile.deleteOnExit(); final String[] cliArgs = - { "-m", "src/test/resources/models/" + modelName + ".json", "-o", tempFile.getCanonicalPath(), "-ow" }; + { "-m", modelPath + "/" + modelName + ".json", "-o", tempFile.getCanonicalPath(), "-ow" }; runModel2Cli(cliArgs); assertTrue(tempFile.isFile()); |