summaryrefslogtreecommitdiffstats
path: root/applications/guard/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'applications/guard/src/test/java')
-rw-r--r--applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java6
-rw-r--r--applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java10
2 files changed, 7 insertions, 9 deletions
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
index f5392cfa..e83f4d29 100644
--- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
+++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
@@ -52,6 +52,7 @@ import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.TextFileUtils;
+import org.onap.policy.guard.OperationsHistory;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
@@ -60,7 +61,6 @@ import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException;
import org.onap.policy.pdp.xacml.application.common.XacmlApplicationServiceProvider;
import org.onap.policy.pdp.xacml.application.common.XacmlPolicyUtils;
import org.onap.policy.pdp.xacml.application.common.operationshistory.CountRecentOperationsPip;
-import org.onap.policy.pdp.xacml.application.common.operationshistory.Dbao;
import org.onap.policy.pdp.xacml.xacmltest.TestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -160,7 +160,7 @@ public class GuardPdpApplicationTest {
@Before
public void startClean() throws Exception {
em.getTransaction().begin();
- em.createQuery("DELETE FROM Dbao").executeUpdate();
+ em.createQuery("DELETE FROM OperationsHistory").executeUpdate();
em.getTransaction().commit();
}
@@ -362,7 +362,7 @@ public class GuardPdpApplicationTest {
//
// Add an entry
//
- Dbao newEntry = new Dbao();
+ OperationsHistory newEntry = new OperationsHistory();
newEntry.setActor(properties.get("actor").toString());
newEntry.setOperation(properties.get("operation").toString());
newEntry.setClosedLoopName(properties.get("clname").toString());
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java
index 4c5bced7..ba51f556 100644
--- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java
+++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java
@@ -34,10 +34,8 @@ import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.UUID;
-
import javax.persistence.EntityManager;
import javax.persistence.Persistence;
-
import org.apache.commons.lang3.tuple.Pair;
import org.junit.AfterClass;
import org.junit.Before;
@@ -51,13 +49,13 @@ import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.TextFileUtils;
+import org.onap.policy.guard.OperationsHistory;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException;
import org.onap.policy.pdp.xacml.application.common.XacmlApplicationServiceProvider;
import org.onap.policy.pdp.xacml.application.common.XacmlPolicyUtils;
import org.onap.policy.pdp.xacml.application.common.operationshistory.CountRecentOperationsPip;
-import org.onap.policy.pdp.xacml.application.common.operationshistory.Dbao;
import org.onap.policy.pdp.xacml.xacmltest.TestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -154,7 +152,7 @@ public class SonCoordinationTest {
@Before
public void startClean() throws Exception {
em.getTransaction().begin();
- em.createQuery("DELETE FROM Dbao").executeUpdate();
+ em.createQuery("DELETE FROM OperationsHistory").executeUpdate();
em.getTransaction().commit();
}
@@ -271,7 +269,7 @@ public class SonCoordinationTest {
//
// Add an entry
//
- Dbao newEntry = new Dbao();
+ OperationsHistory newEntry = new OperationsHistory();
newEntry.setActor(properties.get("actor").toString());
newEntry.setOperation(properties.get("operation").toString());
newEntry.setClosedLoopName(properties.get("clname").toString());
@@ -288,7 +286,7 @@ public class SonCoordinationTest {
private void updateOperationEvent(long id, String outcome) {
- Dbao updateEntry = em.find(Dbao.class, id);
+ OperationsHistory updateEntry = em.find(OperationsHistory.class, id);
updateEntry.setOutcome(outcome);
updateEntry.setEndtime(Date.from(Instant.now()));
em.getTransaction().begin();