diff options
author | Jim Hahn <jrh3@att.com> | 2019-12-11 13:34:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-12-11 13:34:39 +0000 |
commit | 360cffc3b859716273251f077a469939fc80e100 (patch) | |
tree | e9f42d1aaa79a02bafcf0a93c68879430478330b /models-tosca | |
parent | e27645bd4d0e3a873a8e9312b04ae7394ec02bb8 (diff) | |
parent | bc9f1dbb684b5acb28dbbd24c9a11ac2a3f7b3e8 (diff) |
Merge "Update optimization policies"
Diffstat (limited to 'models-tosca')
-rw-r--r-- | models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java index 2c62e7fc0..34feece66 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java @@ -144,26 +144,26 @@ public class ToscaPolicyFilterTest { ToscaPolicyFilter filter = ToscaPolicyFilter.builder().version(ToscaPolicyFilter.LATEST_VERSION).build(); List<ToscaPolicy> filteredList = filter.filter(policyList); - assertEquals(15, filteredList.size()); + assertEquals(22, filteredList.size()); assertEquals(VERSION_100, filteredList.get(7).getVersion()); assertEquals(VERSION_100, filteredList.get(12).getVersion()); - assertEquals(17, policyList.size()); - assertEquals(15, filteredList.size()); + assertEquals(24, policyList.size()); + assertEquals(22, filteredList.size()); policyList.get(10).setVersion("2.0.0"); policyList.get(16).setVersion("3.4.5"); filteredList = filter.filter(policyList); - assertEquals(15, filteredList.size()); - assertEquals("2.0.0", filteredList.get(7).getVersion()); - assertEquals("3.4.5", filteredList.get(12).getVersion()); + assertEquals(22, filteredList.size()); + assertEquals("2.0.0", filteredList.get(12).getVersion()); + assertEquals("3.4.5", filteredList.get(14).getVersion()); policyList.get(10).setVersion(VERSION_100); policyList.get(16).setVersion(VERSION_100); filteredList = filter.filter(policyList); - assertEquals(15, filteredList.size()); - assertEquals(VERSION_100, filteredList.get(7).getVersion()); + assertEquals(22, filteredList.size()); assertEquals(VERSION_100, filteredList.get(12).getVersion()); + assertEquals(VERSION_100, filteredList.get(14).getVersion()); } @Test @@ -182,7 +182,7 @@ public class ToscaPolicyFilterTest { filter = ToscaPolicyFilter.builder().version(VERSION_100).build(); filteredList = filter.filter(policyList); - assertEquals(15, filteredList.size()); + assertEquals(21, filteredList.size()); filter = ToscaPolicyFilter.builder().name("OSDF_CASABLANCA.SubscriberPolicy_v1").version(VERSION_100).build(); filteredList = filter.filter(policyList); @@ -190,7 +190,7 @@ public class ToscaPolicyFilterTest { filter = ToscaPolicyFilter.builder().name("operational.modifyconfig").version(VERSION_100).build(); filteredList = filter.filter(policyList); - assertEquals(2, filteredList.size()); + assertEquals(1, filteredList.size()); } @Test @@ -198,11 +198,11 @@ public class ToscaPolicyFilterTest { // null pattern ToscaPolicyFilter filter = ToscaPolicyFilter.builder().versionPrefix(null).build(); List<ToscaPolicy> filteredList = filter.filter(policyList); - assertEquals(17, filteredList.size()); + assertEquals(24, filteredList.size()); filter = ToscaPolicyFilter.builder().versionPrefix("1.").build(); filteredList = filter.filter(policyList); - assertEquals(14, filteredList.size()); + assertEquals(21, filteredList.size()); filter = ToscaPolicyFilter.builder().versionPrefix("100.").build(); filteredList = filter.filter(policyList); @@ -229,12 +229,12 @@ public class ToscaPolicyFilterTest { filter = ToscaPolicyFilter.builder().typeVersion(VERSION_000).build(); filteredList = filter.filter(policyList); - assertEquals(14, filteredList.size()); + assertEquals(7, filteredList.size()); - filter = ToscaPolicyFilter.builder().type("onap.policies.optimization.HpaPolicy").typeVersion(VERSION_000) - .build(); + filter = ToscaPolicyFilter.builder().type("onap.policies.optimization.resource.HpaPolicy") + .typeVersion(VERSION_100).build(); filteredList = filter.filter(policyList); - assertEquals(1, filteredList.size()); + assertEquals(2, filteredList.size()); filter = ToscaPolicyFilter.builder().type("onap.policies.controlloop.Operational").typeVersion(VERSION_000) .build(); |