Code Review
/
policy
/
models.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Removed db-based statistics feature
[policy/models.git]
/
models-pdp
/
src
/
test
/
java
/
org
/
onap
/
policy
/
models
/
pdp
/
concepts
/
PdpStatusTest.java
diff --git
a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java
b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java
index
3284d95
..
07afd40
100644
(file)
--- a/
models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java
+++ b/
models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java
@@
-1,8
+1,10
@@
-/*
+/*
-
* ============LICENSE_START=======================================================
* ONAP Policy Models
* ================================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ============LICENSE_START=======================================================
* ONAP Policy Models
* ================================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2023 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-29,8
+31,7
@@
import java.util.Collections;
import org.junit.Test;
import org.onap.policy.models.pdp.enums.PdpHealthStatus;
import org.onap.policy.models.pdp.enums.PdpState;
import org.junit.Test;
import org.onap.policy.models.pdp.enums.PdpHealthStatus;
import org.onap.policy.models.pdp.enums.PdpState;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
public class PdpStatusTest {
public class PdpStatusTest {
@@
-38,10
+39,9
@@
public class PdpStatusTest {
public void testCopyConstructor() {
assertThatThrownBy(() -> new PdpStatus(null)).isInstanceOf(NullPointerException.class);
public void testCopyConstructor() {
assertThatThrownBy(() -> new PdpStatus(null)).isInstanceOf(NullPointerException.class);
- PdpStatus orig = new PdpStatus();
+
final
PdpStatus orig = new PdpStatus();
// verify with null values
// verify with null values
- orig.setSupportedPolicyTypes(Collections.emptyList());
orig.setPolicies(Collections.emptyList());
assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpStatus(orig).toString()));
orig.setPolicies(Collections.emptyList());
assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpStatus(orig).toString()));
@@
-53,21
+53,15
@@
public class PdpStatusTest {
orig.setPdpGroup("my-group");
orig.setPdpSubgroup("my-subgroup");
orig.setPdpType("my-type");
orig.setPdpGroup("my-group");
orig.setPdpSubgroup("my-subgroup");
orig.setPdpType("my-type");
- orig.setPolicies(Arrays.asList(new Tosca
Policy
Identifier("policy-A", "1.0.0")));
+ orig.setPolicies(Arrays.asList(new Tosca
Concept
Identifier("policy-A", "1.0.0")));
orig.setProperties("my-properties");
orig.setProperties("my-properties");
- PdpResponseDetails resp = new PdpResponseDetails();
+
final
PdpResponseDetails resp = new PdpResponseDetails();
resp.setResponseMessage("my-response");
orig.setResponse(resp);
orig.setState(PdpState.SAFE);
resp.setResponseMessage("my-response");
orig.setResponse(resp);
orig.setState(PdpState.SAFE);
- PdpStatistics stats = new PdpStatistics();
- stats.setPdpInstanceId("my-pdp-id");
-
- orig.setStatistics(stats);
- orig.setSupportedPolicyTypes(Arrays.asList(new ToscaPolicyTypeIdentifier("type-A", "2.0.0")));
-
assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpStatus(orig).toString()));
}
}
assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpStatus(orig).toString()));
}
}