import org.junit.Test;
import org.onap.policy.models.base.PfConceptKey;
-import org.onap.policy.models.tosca.simple.concepts.ToscaPolicies;
-import org.onap.policy.models.tosca.simple.concepts.ToscaPolicy;
+import org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicies;
+import org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicy;
-public class ToscaPoliciesTest {
+public class JpaToscaPoliciesTest {
@Test
public void testPolicies() {
- assertNotNull(new ToscaPolicies());
- assertNotNull(new ToscaPolicies(new PfConceptKey()));
- assertNotNull(new ToscaPolicies(new PfConceptKey(), new TreeMap<PfConceptKey, ToscaPolicy>()));
- assertNotNull(new ToscaPolicies(new ToscaPolicies()));
+ assertNotNull(new JpaToscaPolicies());
+ assertNotNull(new JpaToscaPolicies(new PfConceptKey()));
+ assertNotNull(new JpaToscaPolicies(new PfConceptKey(), new TreeMap<PfConceptKey, JpaToscaPolicy>()));
+ assertNotNull(new JpaToscaPolicies(new JpaToscaPolicies()));
try {
- new ToscaPolicies((PfConceptKey) null);
+ new JpaToscaPolicies((PfConceptKey) null);
fail("test should throw an exception");
} catch (Exception exc) {
assertEquals("key is marked @NonNull but is null", exc.getMessage());
}
try {
- new ToscaPolicies((ToscaPolicies) null);
+ new JpaToscaPolicies((JpaToscaPolicies) null);
fail("test should throw an exception");
} catch (Exception exc) {
assertEquals("copyConcept is marked @NonNull but is null", exc.getMessage());
}
try {
- new ToscaPolicies(null, null);
+ new JpaToscaPolicies(null, null);
fail("test should throw an exception");
} catch (Exception exc) {
assertEquals("key is marked @NonNull but is null", exc.getMessage());
}
try {
- new ToscaPolicies(new PfConceptKey(), null);
+ new JpaToscaPolicies(new PfConceptKey(), null);
fail("test should throw an exception");
} catch (Exception exc) {
assertEquals("conceptMap is marked @NonNull but is null", exc.getMessage());
}
try {
- new ToscaPolicies(null, new TreeMap<PfConceptKey, ToscaPolicy>());
+ new JpaToscaPolicies(null, new TreeMap<PfConceptKey, JpaToscaPolicy>());
fail("test should throw an exception");
} catch (Exception exc) {
assertEquals("key is marked @NonNull but is null", exc.getMessage());