diff options
Diffstat (limited to 'model/basic-model/src')
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/KeyUseTest.java) | 2 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestEntity.java) | 18 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java | 64 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ExceptionsTest.java) | 2 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelFileWriterTest.java) | 4 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelReaderTest.java) | 6 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelSaverTest.java) | 4 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelStringWriterTest.java) | 4 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelWriterTest.java) | 4 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SchemaGeneratorTest.java) | 2 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelCreator.java) | 6 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/AxModelWithReferences.java) | 4 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexBasicModelConceptsTest.java) | 6 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelTester.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexBasicModelTest.java) | 4 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportBasicModelTester.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/BasicModelTest.java) | 12 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ConceptGetterTest.java) | 4 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator0Test.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator0.java) | 2 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator1Test.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator1.java) | 2 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator2Test.java (renamed from model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator2.java) | 2 | ||||
-rw-r--r-- | model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/ModelServiceTest.java | 6 | ||||
-rw-r--r-- | model/basic-model/src/test/resources/META-INF/persistence.xml | 2 |
21 files changed, 80 insertions, 80 deletions
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/KeyUseTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java index 65df26d65..a1d272775 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/KeyUseTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java @@ -33,7 +33,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyUse; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; -public class KeyUseTest { +public class AxKeyUseTest { @Test public void test() { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestEntity.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java index 2667f3d4d..02174488e 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestEntity.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java @@ -38,7 +38,7 @@ import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter; @Entity @Table(name = "TestEntity") -public class TestEntity extends AxConcept { +public class DummyEntity extends AxConcept { private static final long serialVersionUID = -2962570563281067894L; @EmbeddedId() @@ -48,17 +48,17 @@ public class TestEntity extends AxConcept { private double doubleValue; - public TestEntity() { + public DummyEntity() { this.key = new AxReferenceKey(); this.doubleValue = 0; } - public TestEntity(Double doubleValue) { + public DummyEntity(Double doubleValue) { this.key = new AxReferenceKey(); this.doubleValue = doubleValue; } - public TestEntity(AxReferenceKey key, Double doubleValue) { + public DummyEntity(AxReferenceKey key, Double doubleValue) { this.key = key; this.doubleValue = doubleValue; } @@ -107,9 +107,9 @@ public class TestEntity extends AxConcept { @Override public AxConcept copyTo(AxConcept target) { - final Object copyObject = ((target == null) ? new TestEntity() : target); - if (copyObject instanceof TestEntity) { - final TestEntity copy = ((TestEntity) copyObject); + final Object copyObject = ((target == null) ? new DummyEntity() : target); + if (copyObject instanceof DummyEntity) { + final DummyEntity copy = ((DummyEntity) copyObject); if (this.checkSetKey()) { copy.setKey(new AxReferenceKey(key)); } else { @@ -141,7 +141,7 @@ public class TestEntity extends AxConcept { if (getClass() != obj.getClass()) { return false; } - TestEntity other = (TestEntity) obj; + DummyEntity other = (DummyEntity) obj; if (key == null) { if (other.key != null) { return false; @@ -163,7 +163,7 @@ public class TestEntity extends AxConcept { if (this == otherObj) { return 0; } - TestEntity other = (TestEntity) otherObj; + DummyEntity other = (DummyEntity) otherObj; if (key == null) { if (other.key != null) { return 1; diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java index 4c99ce314..0258b9305 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java @@ -42,7 +42,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; -import org.onap.policy.apex.model.basicmodel.concepts.TestEntity; +import org.onap.policy.apex.model.basicmodel.concepts.DummyEntity; /** * JUnit test class. @@ -240,57 +240,57 @@ public class EntityTest { final AxArtifactKey owner4Key = new AxArtifactKey("Owner4", "0.0.1"); final AxArtifactKey owner5Key = new AxArtifactKey("Owner5", "0.0.1"); - apexDao.create(new TestEntity(new AxReferenceKey(owner0Key, "Entity0"), 100.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner0Key, "Entity1"), 101.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner0Key, "Entity2"), 102.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner0Key, "Entity3"), 103.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner0Key, "Entity4"), 104.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner1Key, "Entity5"), 105.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner1Key, "Entity6"), 106.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner1Key, "Entity7"), 107.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner2Key, "Entity8"), 108.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner2Key, "Entity9"), 109.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner3Key, "EntityA"), 110.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner4Key, "EntityB"), 111.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner5Key, "EntityC"), 112.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner5Key, "EntityD"), 113.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner5Key, "EntityE"), 114.0)); - apexDao.create(new TestEntity(new AxReferenceKey(owner5Key, "EntityF"), 115.0)); - - TreeSet<TestEntity> testEntitySetOut = new TreeSet<TestEntity>(apexDao.getAll(TestEntity.class)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner0Key, "Entity0"), 100.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner0Key, "Entity1"), 101.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner0Key, "Entity2"), 102.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner0Key, "Entity3"), 103.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner0Key, "Entity4"), 104.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner1Key, "Entity5"), 105.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner1Key, "Entity6"), 106.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner1Key, "Entity7"), 107.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner2Key, "Entity8"), 108.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner2Key, "Entity9"), 109.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner3Key, "EntityA"), 110.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner4Key, "EntityB"), 111.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner5Key, "EntityC"), 112.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner5Key, "EntityD"), 113.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner5Key, "EntityE"), 114.0)); + apexDao.create(new DummyEntity(new AxReferenceKey(owner5Key, "EntityF"), 115.0)); + + TreeSet<DummyEntity> testEntitySetOut = new TreeSet<DummyEntity>(apexDao.getAll(DummyEntity.class)); assertEquals(16, testEntitySetOut.size()); - testEntitySetOut = new TreeSet<TestEntity>(apexDao.getAll(TestEntity.class, owner0Key)); + testEntitySetOut = new TreeSet<DummyEntity>(apexDao.getAll(DummyEntity.class, owner0Key)); assertEquals(5, testEntitySetOut.size()); - testEntitySetOut = new TreeSet<TestEntity>(apexDao.getAll(TestEntity.class, owner1Key)); + testEntitySetOut = new TreeSet<DummyEntity>(apexDao.getAll(DummyEntity.class, owner1Key)); assertEquals(3, testEntitySetOut.size()); - testEntitySetOut = new TreeSet<TestEntity>(apexDao.getAll(TestEntity.class, owner2Key)); + testEntitySetOut = new TreeSet<DummyEntity>(apexDao.getAll(DummyEntity.class, owner2Key)); assertEquals(2, testEntitySetOut.size()); - testEntitySetOut = new TreeSet<TestEntity>(apexDao.getAll(TestEntity.class, owner3Key)); + testEntitySetOut = new TreeSet<DummyEntity>(apexDao.getAll(DummyEntity.class, owner3Key)); assertEquals(1, testEntitySetOut.size()); - testEntitySetOut = new TreeSet<TestEntity>(apexDao.getAll(TestEntity.class, owner4Key)); + testEntitySetOut = new TreeSet<DummyEntity>(apexDao.getAll(DummyEntity.class, owner4Key)); assertEquals(1, testEntitySetOut.size()); - testEntitySetOut = new TreeSet<TestEntity>(apexDao.getAll(TestEntity.class, owner5Key)); + testEntitySetOut = new TreeSet<DummyEntity>(apexDao.getAll(DummyEntity.class, owner5Key)); assertEquals(4, testEntitySetOut.size()); - assertNotNull(apexDao.get(TestEntity.class, new AxReferenceKey(owner0Key, "Entity0"))); - assertNotNull(apexDao.getArtifact(TestEntity.class, new AxReferenceKey(owner0Key, "Entity0"))); - assertNull(apexDao.get(TestEntity.class, new AxReferenceKey(owner0Key, "Entity1000"))); - assertNull(apexDao.getArtifact(TestEntity.class, new AxReferenceKey(owner0Key, "Entity1000"))); - apexDao.delete(TestEntity.class, new AxReferenceKey(owner0Key, "Entity0")); + assertNotNull(apexDao.get(DummyEntity.class, new AxReferenceKey(owner0Key, "Entity0"))); + assertNotNull(apexDao.getArtifact(DummyEntity.class, new AxReferenceKey(owner0Key, "Entity0"))); + assertNull(apexDao.get(DummyEntity.class, new AxReferenceKey(owner0Key, "Entity1000"))); + assertNull(apexDao.getArtifact(DummyEntity.class, new AxReferenceKey(owner0Key, "Entity1000"))); + apexDao.delete(DummyEntity.class, new AxReferenceKey(owner0Key, "Entity0")); final Set<AxReferenceKey> rKeySetIn = new TreeSet<AxReferenceKey>(); rKeySetIn.add(new AxReferenceKey(owner4Key, "EntityB")); rKeySetIn.add(new AxReferenceKey(owner5Key, "EntityD")); - final int deletedRCount = apexDao.deleteByReferenceKey(TestEntity.class, rKeySetIn); + final int deletedRCount = apexDao.deleteByReferenceKey(DummyEntity.class, rKeySetIn); assertEquals(2, deletedRCount); - apexDao.update(new TestEntity(new AxReferenceKey(owner5Key, "EntityF"), 120.0)); + apexDao.update(new DummyEntity(new AxReferenceKey(owner5Key, "EntityF"), 120.0)); } } diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ExceptionsTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java index 8715cabe5..c74f33ccb 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ExceptionsTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java @@ -28,7 +28,7 @@ import java.io.IOException; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; -public class ExceptionsTest { +public class ApexModelExceptionTest { @Test public void test() { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelFileWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java index 9a894e86b..7c0ccc7d1 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelFileWriterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java @@ -31,7 +31,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter; -public class ModelFileWriterTest { +public class ApexModelFileWriterTest { @Test public void testModelFileWriter() throws IOException, ApexException { @@ -47,7 +47,7 @@ public class ModelFileWriterTest { File jsonTempFile = new File(tempDir.getAbsolutePath() + "/aaa/ApexFileWriterTest.json"); File xmlTempFile = new File(tempDir.getAbsolutePath() + "/ccc/ApexFileWriterTest.xml"); - AxModel model = new TestApexBasicModelCreator().getModel(); + AxModel model = new DummyApexBasicModelCreator().getModel(); modelFileWriter.apexModelWriteJsonFile(model, AxModel.class, jsonTempFile.getAbsolutePath()); modelFileWriter.apexModelWriteXmlFile(model, AxModel.class, xmlTempFile.getAbsolutePath()); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelReaderTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java index e4e33460e..20815ae72 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelReaderTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java @@ -39,12 +39,12 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter; -public class ModelReaderTest { +public class ApexModelReaderTest { @Test public void testModelReader() throws IOException, ApexException { - AxModel model = new TestApexBasicModelCreator().getModel(); - AxModel invalidModel = new TestApexBasicModelCreator().getInvalidModel(); + AxModel model = new DummyApexBasicModelCreator().getModel(); + AxModel invalidModel = new DummyApexBasicModelCreator().getInvalidModel(); ApexModelWriter<AxModel> modelWriter = new ApexModelWriter<AxModel>(AxModel.class); modelWriter.setValidateFlag(true); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelSaverTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java index b318fc7af..65640916a 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelSaverTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java @@ -30,11 +30,11 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.handling.ApexModelSaver; -public class ModelSaverTest { +public class ApexModelSaverTest { @Test public void testModelSaver() throws IOException, ApexException { - AxModel model = new TestApexBasicModelCreator().getModel(); + AxModel model = new DummyApexBasicModelCreator().getModel(); Path tempPath = Files.createTempDirectory("ApexTest"); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelStringWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java index a44387559..22271dda3 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelStringWriterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java @@ -33,11 +33,11 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.handling.ApexModelStringWriter; -public class ModelStringWriterTest { +public class ApexModelStringWriterTest { @Test public void testModelStringWriter() throws IOException, ApexException { - AxModel basicModel = new TestApexBasicModelCreator().getModel(); + AxModel basicModel = new DummyApexBasicModelCreator().getModel(); assertNotNull(basicModel); AxKeyInfo intKeyInfo = basicModel.getKeyInformation().get("IntegerKIKey"); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java index f79b4e4c6..d7ff4c08b 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ModelWriterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java @@ -33,7 +33,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter; -public class ModelWriterTest { +public class ApexModelWriterTest { @Test public void testModelWriter() throws IOException, ApexException { @@ -51,7 +51,7 @@ public class ModelWriterTest { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - AxModel model = new TestApexBasicModelCreator().getModel(); + AxModel model = new DummyApexBasicModelCreator().getModel(); modelWriter.write(model, baos); modelWriter.setJsonOutput(true); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SchemaGeneratorTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java index 5950f1acc..e7388b7e9 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SchemaGeneratorTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java @@ -31,7 +31,7 @@ import java.io.PrintStream; import org.junit.Test; -public class SchemaGeneratorTest { +public class ApexSchemaGeneratorTest { @Test public void test() throws IOException { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelCreator.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java index b11669fdf..d04d3a441 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelCreator.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java @@ -28,7 +28,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator; -public class TestApexBasicModelCreator implements TestApexModelCreator<AxModel> { +public class DummyApexBasicModelCreator implements TestApexModelCreator<AxModel> { @Override public AxModel getModel() { @@ -112,10 +112,10 @@ public class TestApexBasicModelCreator implements TestApexModelCreator<AxModel> * Get the model with its references. * @return the model with its references */ - public final AxModelWithReferences getModelWithReferences() { + public final DummyAxModelWithReferences getModelWithReferences() { AxModel model = getModel(); - AxModelWithReferences modelWithReferences = new AxModelWithReferences(model.getKey()); + DummyAxModelWithReferences modelWithReferences = new DummyAxModelWithReferences(model.getKey()); modelWithReferences.setKeyInformation(model.getKeyInformation()); modelWithReferences.setReferenceKeyList(); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/AxModelWithReferences.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java index 8e52b393f..e0fe60337 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/AxModelWithReferences.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java @@ -28,12 +28,12 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKey; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; -public class AxModelWithReferences extends AxModel { +public class DummyAxModelWithReferences extends AxModel { private static final long serialVersionUID = -8194956638511120008L; private List<AxKey> extrakeyList = new ArrayList<>(); - public AxModelWithReferences(final AxArtifactKey key) { + public DummyAxModelWithReferences(final AxArtifactKey key) { super(key); } diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexBasicModelConceptsTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java index f2076c6e4..6ca94ddc8 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexBasicModelConceptsTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java @@ -43,12 +43,12 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.Validat import org.onap.policy.apex.model.basicmodel.service.ModelService; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; -public class ApexBasicModelConceptsTest { +public class SupportApexBasicModelConceptsTester { TestApexModel<AxModel> testApexModel; @Before public void setup() throws Exception { - testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexBasicModelCreator()); + testApexModel = new TestApexModel<AxModel>(AxModel.class, new DummyApexBasicModelCreator()); } @Test @@ -203,7 +203,7 @@ public class ApexBasicModelConceptsTest { @Test public void testModelConceptsWithReferences() { - final AxModelWithReferences mwr = new TestApexBasicModelCreator().getModelWithReferences(); + final DummyAxModelWithReferences mwr = new DummyApexBasicModelCreator().getModelWithReferences(); assertNotNull(mwr); mwr.getKeyInformation().getKeyInfoMap().clear(); mwr.getKeyInformation().generateKeyInfo(mwr); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexBasicModelTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelTester.java index e8c8ef154..a89be5477 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexBasicModelTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelTester.java @@ -36,7 +36,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; -public class ApexBasicModelTest { +public class SupportApexBasicModelTester { private Connection connection; TestApexModel<AxModel> testApexModel; @@ -50,7 +50,7 @@ public class ApexBasicModelTest { Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true"); - testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexBasicModelCreator()); + testApexModel = new TestApexModel<AxModel>(AxModel.class, new DummyApexBasicModelCreator()); } @After diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/BasicModelTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportBasicModelTester.java index 9881c7355..e632a521e 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/BasicModelTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportBasicModelTester.java @@ -29,12 +29,12 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; -public class BasicModelTest { +public class SupportBasicModelTester { @Test public void testNormalModelCreator() throws ApexException { final TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, - new TestApexBasicModelCreator()); + new DummyApexBasicModelCreator()); testApexModel.testApexModelValid(); try { @@ -54,7 +54,7 @@ public class BasicModelTest { @Test public void testModelCreator0() throws ApexException { final TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, - new TestApexTestModelCreator0()); + new TestApexModelCreator0Test()); testApexModel.testApexModelValid(); try { @@ -86,7 +86,7 @@ public class BasicModelTest { @Test public void testModelCreator1() throws ApexException { final TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, - new TestApexTestModelCreator1()); + new TestApexModelCreator1Test()); try { testApexModel.testApexModelValid(); @@ -113,7 +113,7 @@ public class BasicModelTest { @Test public void testModelCreator2() throws ApexException { final TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, - new TestApexTestModelCreator2()); + new TestApexModelCreator2Test()); testApexModel.testApexModelValid(); testApexModel.testApexModelVaidateObservation(); @@ -128,7 +128,7 @@ public class BasicModelTest { @Test public void testModelCreator1XmlJson() throws ApexException { final TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, - new TestApexTestModelCreator1()); + new TestApexModelCreator1Test()); try { testApexModel.testApexModelWriteReadJson(); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ConceptGetterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java index 5dfd6711b..bed65c6e7 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ConceptGetterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java @@ -37,11 +37,11 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter; import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; -public class ConceptGetterTest { +public class SupportConceptGetterTester { @Test public void testConceptGetter() throws IOException, ApexException { - AxModel basicModel = new TestApexBasicModelCreator().getModel(); + AxModel basicModel = new DummyApexBasicModelCreator().getModel(); assertNotNull(basicModel); AxKeyInfo intKI01 = new AxKeyInfo(new AxArtifactKey("IntegerKIKey01", "0.0.1"), UUID.randomUUID(), diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator0.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator0Test.java index a3d841a51..d0e8807e1 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator0.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator0Test.java @@ -26,7 +26,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator; -public class TestApexTestModelCreator0 implements TestApexModelCreator<AxModel> { +public class TestApexModelCreator0Test implements TestApexModelCreator<AxModel> { @Override public AxModel getModel() { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator1.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator1Test.java index cbbe05a36..f785a47ba 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator1.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator1Test.java @@ -28,7 +28,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator; -public class TestApexTestModelCreator1 implements TestApexModelCreator<AxModel> { +public class TestApexModelCreator1Test implements TestApexModelCreator<AxModel> { @Override public AxModel getModel() { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator2.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator2Test.java index a7b77865d..9be21f522 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator2.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexModelCreator2Test.java @@ -26,7 +26,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator; -public class TestApexTestModelCreator2 implements TestApexModelCreator<AxModel> { +public class TestApexModelCreator2Test implements TestApexModelCreator<AxModel> { @Override public AxModel getModel() { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/ModelServiceTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/ModelServiceTest.java index f1bb220b3..1ebfb6d71 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/ModelServiceTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/ModelServiceTest.java @@ -27,7 +27,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation; -import org.onap.policy.apex.model.basicmodel.handling.TestApexBasicModelCreator; +import org.onap.policy.apex.model.basicmodel.handling.DummyApexBasicModelCreator; public class ModelServiceTest { @@ -44,7 +44,7 @@ public class ModelServiceTest { } ModelService.registerModel(AxKeyInformation.class, - new TestApexBasicModelCreator().getModel().getKeyInformation()); + new DummyApexBasicModelCreator().getModel().getKeyInformation()); assertTrue(ModelService.existsModel(AxKeyInformation.class)); assertNotNull(ModelService.getModel(AxKeyInformation.class)); @@ -59,7 +59,7 @@ public class ModelServiceTest { } ModelService.registerModel(AxKeyInformation.class, - new TestApexBasicModelCreator().getModel().getKeyInformation()); + new DummyApexBasicModelCreator().getModel().getKeyInformation()); assertTrue(ModelService.existsModel(AxKeyInformation.class)); assertNotNull(ModelService.getModel(AxKeyInformation.class)); diff --git a/model/basic-model/src/test/resources/META-INF/persistence.xml b/model/basic-model/src/test/resources/META-INF/persistence.xml index ffc6526c3..68f03e8e5 100644 --- a/model/basic-model/src/test/resources/META-INF/persistence.xml +++ b/model/basic-model/src/test/resources/META-INF/persistence.xml @@ -30,7 +30,7 @@ <class>org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo</class> <class>org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation</class> <class>org.onap.policy.apex.model.basicmodel.concepts.AxModel</class> - <class>org.onap.policy.apex.model.basicmodel.concepts.TestEntity</class> + <class>org.onap.policy.apex.model.basicmodel.concepts.DummyEntity</class> <properties> <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" /> |