diff options
Diffstat (limited to 'models-tosca/src/test/java')
2 files changed, 8 insertions, 8 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeFilterTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeFilterTest.java index 28836a981..d9ffec566 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeFilterTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeFilterTest.java @@ -144,19 +144,19 @@ public class ToscaPolicyTypeFilterTest { List<ToscaPolicyType> filteredList = filter.filter(typeList); assertEquals(20, filteredList.size()); assertEquals(VERSION_100, filteredList.get(0).getVersion()); - assertEquals(VERSION_000, filteredList.get(11).getVersion()); + assertEquals(VERSION_100, filteredList.get(11).getVersion()); typeList.get(12).setVersion("2.0.0"); filteredList = filter.filter(typeList); assertEquals(20, filteredList.size()); assertEquals("2.0.0", filteredList.get(11).getVersion()); - assertEquals(VERSION_000, filteredList.get(18).getVersion()); + assertEquals(VERSION_100, filteredList.get(18).getVersion()); typeList.get(12).setVersion(VERSION_100); filteredList = filter.filter(typeList); assertEquals(20, filteredList.size()); assertEquals(VERSION_100, filteredList.get(0).getVersion()); - assertEquals(VERSION_000, filteredList.get(18).getVersion()); + assertEquals(VERSION_100, filteredList.get(18).getVersion()); } @Test @@ -175,12 +175,12 @@ public class ToscaPolicyTypeFilterTest { filter = ToscaPolicyTypeFilter.builder().version(VERSION_000).build(); filteredList = filter.filter(typeList); - assertEquals(9, filteredList.size()); + assertEquals(1, filteredList.size()); filter = ToscaPolicyTypeFilter.builder().name("onap.policies.optimization.Vim_fit").version(VERSION_000) .build(); filteredList = filter.filter(typeList); - assertEquals(1, filteredList.size()); + assertEquals(0, filteredList.size()); filter = ToscaPolicyTypeFilter.builder().name("onap.policies.optimization.Vim_fit").version("0.0.1").build(); filteredList = filter.filter(typeList); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java index d77b52daa..20b8e5d1e 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java @@ -56,8 +56,8 @@ import org.yaml.snakeyaml.Yaml; */ public class AuthorativeToscaProviderPolicyTypeTest { private static final String VERSION = "version"; - private static final String POLICY_AFFINITY_VERSION0 = "onap.policies.optimization.AffinityPolicy:0.0.0"; - private static final String POLICY_AFFINITY = "onap.policies.optimization.AffinityPolicy"; + private static final String POLICY_AFFINITY_VERSION0 = "onap.policies.NoVersion:0.0.0"; + private static final String POLICY_AFFINITY = "onap.policies.NoVersion"; private static final String MISSING_POLICY_TYPES = "no policy types specified on service template"; private static final String DAO_IS_NULL = "dao is marked @NonNull but is null"; private static final String VERSION_000 = "0.0.0"; @@ -74,7 +74,7 @@ public class AuthorativeToscaProviderPolicyTypeTest { @BeforeClass public static void readPolicyDefinition() { String yamlString = - ResourceUtils.getResourceAsString("policytypes/onap.policies.optimization.AffinityPolicy.yaml"); + ResourceUtils.getResourceAsString("src/test/resources/onap.policies.NoVersion.yaml"); Object yamlObject = new Yaml().load(yamlString); yamlAsJsonString = new GsonBuilder().setPrettyPrinting().create().toJson(yamlObject); |