diff options
author | 2020-06-02 12:00:37 +0000 | |
---|---|---|
committer | 2020-06-02 12:00:37 +0000 | |
commit | 893d64185a9432e2fd8808e58f8a76566fceaaf9 (patch) | |
tree | 385c04e893dd674621ce7436be522cac0b53ed19 /applications/common/src/test/java/org | |
parent | 4dcc36142e51b389c5df97c227acc08608caa3b0 (diff) | |
parent | 3c703e2e48c0e74cb580b8afafb212fb9728aeeb (diff) |
Merge "Use OperationsHistory from models"
Diffstat (limited to 'applications/common/src/test/java/org')
2 files changed, 8 insertions, 6 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java index 29eb2a0c..badc5f9c 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java @@ -51,6 +51,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.onap.policy.guard.OperationsHistory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -216,7 +217,7 @@ public class CountRecentOperationsPipTest { // // create entry // - Dbao newEntry = createEntry("cl-foobar-1", "vnf-1", "SUCCESS"); + OperationsHistory newEntry = createEntry("cl-foobar-1", "vnf-1", "SUCCESS"); // // No entries yet // @@ -241,7 +242,7 @@ public class CountRecentOperationsPipTest { @Test public void testStringToChronoUnit() throws PIPException { // not configured yet - Dbao newEntry = createEntry("cl-foobar-1", "vnf-1", "SUCCESS"); + OperationsHistory newEntry = createEntry("cl-foobar-1", "vnf-1", "SUCCESS"); assertEquals(-1, getCount(newEntry)); // now configure it @@ -266,7 +267,7 @@ public class CountRecentOperationsPipTest { assertEquals(-1, getCount(newEntry)); } - private long getCount(Dbao newEntry) throws PIPException { + private long getCount(OperationsHistory newEntry) throws PIPException { responses = new LinkedList<>(Arrays.asList(resp1, resp2, resp3)); attributes = new LinkedList<>( Arrays.asList(newEntry.getActor(), newEntry.getOperation(), newEntry.getTarget())); @@ -279,11 +280,11 @@ public class CountRecentOperationsPipTest { return ((Number) value.getValue()).longValue(); } - private Dbao createEntry(String cl, String target, String outcome) { + private OperationsHistory createEntry(String cl, String target, String outcome) { // // Create entry // - Dbao newEntry = new Dbao(); + OperationsHistory newEntry = new OperationsHistory(); newEntry.setClosedLoopName(cl); newEntry.setTarget(target); newEntry.setOutcome(outcome); diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java index b5273e6d..dd961d8c 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java @@ -47,6 +47,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.onap.policy.guard.OperationsHistory; import org.onap.policy.pdp.xacml.application.common.ToscaDictionary; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -234,7 +235,7 @@ public class GetOperationOutcomePipTest { // // Create entry // - Dbao newEntry = new Dbao(); + OperationsHistory newEntry = new OperationsHistory(); newEntry.setClosedLoopName(cl); newEntry.setTarget(target); newEntry.setOutcome(outcome); |