Refactor persistence JPA testing 53/56453/4
authorDinh Danh Le <dinh.danh.le@ericsson.com>
Sun, 15 Jul 2018 01:52:33 +0000 (02:52 +0100)
committerDinh Danh Le <dinh.danh.le@ericsson.com>
Mon, 16 Jul 2018 13:07:50 +0000 (14:07 +0100)
commit2df5543498c0fa0a2ba120eec744aa4cde929199
tree2db4f026911e3a60d06ab468c2c041e1d7ff4672
parent08b595c863b45e759e57ef419c83dad2b209df9c
Refactor persistence JPA testing

Adding tests for EclipseLink and refactoring Hibernate testcases.

As both tests use the same test entities, the two existing test entity
classes from org.onap.policy.apex.plugins.persistence.jpa.hibernate
are moved to a newly created package
org.onap.policy.apex.context.test.entities under context-test-utils.

Relevent POM files are changed w.r.t this change. In particular,
 1) add version infos as properties in apex-pdp/pom.xml
 2) common dependencies related to Junit testing for EclipseLink and
Hibernate are moved to their parent plugins-persistence-jpa's POM.

Change-Id: I9d9387154cbfdfc69be49960b80e040b6fd35b5a
Signed-off-by: Dinh Danh Le <dinh.danh.le@ericsson.com>
Issue-ID: POLICY-862
context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ArtifactKeyTestEntity.java [moved from plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/ArtifactKeyTestEntity.java with 98% similarity]
context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/ReferenceKeyTestEntity.java [moved from plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/ReferenceKeyTestEntity.java with 98% similarity]
context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/entities/package-info.java [new file with mode: 0644]
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/pom.xml
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java [new file with mode: 0644]
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/resources/META-INF/persistence.xml [new file with mode: 0644]
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/pom.xml
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/hibernate/HibernateApexDaoTest.java
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-hibernate/src/test/resources/META-INF/persistence.xml
plugins/plugins-persistence/plugins-persistence-jpa/pom.xml
pom.xml