X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-tosca%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fmodels%2Ftosca%2Fauthorative%2Fconcepts%2FToscaPolicyTypeConceptIdentifierTest.java;fp=models-tosca%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fmodels%2Ftosca%2Fauthorative%2Fconcepts%2FToscaPolicyIdentifierTest.java;h=7845a1f32abced49c9048d111da5b40b92bf7744;hb=f2b0318f53abf9f2345a5cdca74f3dd635aa9b60;hp=cc40e241035dc73edd0909cc4a8aa942348d82bc;hpb=8ad3f95cdcec48b8315a5febfd4ec07bae7aabba;p=policy%2Fmodels.git diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeConceptIdentifierTest.java similarity index 70% rename from models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierTest.java rename to models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeConceptIdentifierTest.java index cc40e2410..7845a1f32 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeConceptIdentifierTest.java @@ -3,6 +3,7 @@ * ONAP Policy Models * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,39 +34,39 @@ import org.onap.policy.common.parameters.ValidationResult; /** * Test methods not tested by {@link PojosTest}. */ -public class ToscaPolicyIdentifierTest extends ToscaIdentifierTestBase { +public class ToscaPolicyTypeConceptIdentifierTest extends ToscaIdentifierTestBase { - public ToscaPolicyIdentifierTest() { - super(ToscaPolicyIdentifier.class, "name", "version"); + public ToscaPolicyTypeConceptIdentifierTest() { + super(ToscaConceptIdentifier.class, "name", "version"); } @Test public void testAllArgsConstructor() { - assertThatThrownBy(() -> new ToscaPolicyIdentifier(null, VERSION)).isInstanceOf(NullPointerException.class); - assertThatThrownBy(() -> new ToscaPolicyIdentifier(NAME, null)).isInstanceOf(NullPointerException.class); + assertThatThrownBy(() -> new ToscaConceptIdentifier(null, VERSION)).isInstanceOf(NullPointerException.class); + assertThatThrownBy(() -> new ToscaConceptIdentifier(NAME, null)).isInstanceOf(NullPointerException.class); - ToscaPolicyIdentifier orig = new ToscaPolicyIdentifier(NAME, VERSION); + ToscaConceptIdentifier orig = new ToscaConceptIdentifier(NAME, VERSION); assertEquals(NAME, orig.getName()); assertEquals(VERSION, orig.getVersion()); } @Test public void testCopyConstructor() { - assertThatThrownBy(() -> new ToscaPolicyIdentifier(null)).isInstanceOf(NullPointerException.class); + assertThatThrownBy(() -> new ToscaConceptIdentifier(null)).isInstanceOf(NullPointerException.class); - ToscaPolicyIdentifier orig = new ToscaPolicyIdentifier(); + ToscaConceptIdentifier orig = new ToscaConceptIdentifier(); // verify with null values - assertEquals(orig.toString(), new ToscaPolicyIdentifier(orig).toString()); + assertEquals(orig.toString(), new ToscaConceptIdentifier(orig).toString()); // verify with all values - orig = new ToscaPolicyIdentifier(NAME, VERSION); - assertEquals(orig.toString(), new ToscaPolicyIdentifier(orig).toString()); + orig = new ToscaConceptIdentifier(NAME, VERSION); + assertEquals(orig.toString(), new ToscaConceptIdentifier(orig).toString()); } @Test public void testValidatePapRest() throws Exception { - ToscaPolicyIdentifier ident = new ToscaPolicyIdentifier(NAME, VERSION); + ToscaConceptIdentifier ident = new ToscaConceptIdentifier(NAME, VERSION); ValidationResult result = ident.validatePapRest(); assertNotNull(result); assertTrue(result.isValid());