summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/sdc/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-03-12 18:55:21 -0400
committerJim Hahn <jrh3@att.com>2020-03-12 19:36:44 -0400
commit309c49634bf9fcb53458d3e5f07684cb7bfbdd6f (patch)
treec3d020e98b3ea052f34588a036310ecf0c7032f9 /models-interactions/model-impl/sdc/src/test/java
parent77c21cec25d98cf5832acfab38a532006c639669 (diff)
Revert some UUID variable names
Unfortunately, some code uses "new Yaml(...)" to decode policies and "Yaml" doesn't understand GSON annotations. As a result, this means that the field names must match the serialized name, thus they must continue to end with "UUID" instead of "Uuid". Issue-ID: POLICY-1910 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I97c2f5c7e59b758b13a1dbcceed709b2e2e064a2
Diffstat (limited to 'models-interactions/model-impl/sdc/src/test/java')
-rw-r--r--models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java64
-rw-r--r--models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java28
2 files changed, 46 insertions, 46 deletions
diff --git a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java
index c81a12fc5..3e134d67b 100644
--- a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java
+++ b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceInstanceTest.java
@@ -38,29 +38,29 @@ public class ServiceInstanceTest {
public void testConstructors() {
ServiceInstance si = new ServiceInstance();
assertEquals(null, si.getServiceInstanceName());
- assertEquals(null, si.getServiceUuid());
- assertEquals(null, si.getServiceInstanceUuid());
+ assertEquals(null, si.getServiceUUID());
+ assertEquals(null, si.getServiceInstanceUUID());
assertEquals(null, si.getServiceName());
- assertEquals(null, si.getPersonaModelUuid());
- assertEquals(null, si.getWidgetModelUuid());
+ assertEquals(null, si.getPersonaModelUUID());
+ assertEquals(null, si.getWidgetModelUUID());
assertEquals(null, si.getWidgetModelVersion());
ServiceInstance si2 = new ServiceInstance((ServiceInstance) null);
assertEquals(null, si2.getServiceInstanceName());
- assertEquals(null, si2.getServiceUuid());
- assertEquals(null, si2.getServiceInstanceUuid());
+ assertEquals(null, si2.getServiceUUID());
+ assertEquals(null, si2.getServiceInstanceUUID());
assertEquals(null, si2.getServiceName());
- assertEquals(null, si2.getPersonaModelUuid());
- assertEquals(null, si2.getWidgetModelUuid());
+ assertEquals(null, si2.getPersonaModelUUID());
+ assertEquals(null, si2.getWidgetModelUUID());
assertEquals(null, si2.getWidgetModelVersion());
si2 = new ServiceInstance(si);
assertEquals(si2.getServiceInstanceName(), si.getServiceInstanceName());
- assertEquals(si2.getServiceUuid(), si.getServiceUuid());
- assertEquals(si2.getServiceInstanceUuid(), si.getServiceInstanceUuid());
+ assertEquals(si2.getServiceUUID(), si.getServiceUUID());
+ assertEquals(si2.getServiceInstanceUUID(), si.getServiceInstanceUUID());
assertEquals(si2.getServiceName(), si.getServiceName());
- assertEquals(si2.getPersonaModelUuid(), si.getPersonaModelUuid());
- assertEquals(si2.getWidgetModelUuid(), si.getWidgetModelUuid());
+ assertEquals(si2.getPersonaModelUUID(), si.getPersonaModelUUID());
+ assertEquals(si2.getWidgetModelUUID(), si.getWidgetModelUUID());
assertEquals(si2.getWidgetModelVersion(), si.getWidgetModelVersion());
}
@@ -77,16 +77,16 @@ public class ServiceInstanceTest {
public void testUuid() {
ServiceInstance si = new ServiceInstance();
UUID uuid = UUID.randomUUID();
- si.setServiceUuid(uuid);
- assertEquals(uuid, si.getServiceUuid());
+ si.setServiceUUID(uuid);
+ assertEquals(uuid, si.getServiceUUID());
}
@Test
public void testInstanceUuid() {
ServiceInstance si = new ServiceInstance();
UUID uuid = UUID.randomUUID();
- si.setServiceInstanceUuid(uuid);
- assertEquals(uuid, si.getServiceInstanceUuid());
+ si.setServiceInstanceUUID(uuid);
+ assertEquals(uuid, si.getServiceInstanceUUID());
}
@Test
@@ -101,16 +101,16 @@ public class ServiceInstanceTest {
public void testPersonaModelUuid() {
ServiceInstance si = new ServiceInstance();
UUID uuid = UUID.randomUUID();
- si.setPersonaModelUuid(uuid);
- assertEquals(uuid, si.getPersonaModelUuid());
+ si.setPersonaModelUUID(uuid);
+ assertEquals(uuid, si.getPersonaModelUUID());
}
@Test
public void testWidgetModelUuid() {
ServiceInstance si = new ServiceInstance();
UUID uuid = UUID.randomUUID();
- si.setWidgetModelUuid(uuid);
- assertEquals(uuid, si.getWidgetModelUuid());
+ si.setWidgetModelUUID(uuid);
+ assertEquals(uuid, si.getWidgetModelUUID());
}
@Test
@@ -131,10 +131,10 @@ public class ServiceInstanceTest {
si1.setServiceInstanceName(INSTANCE);
si1.setServiceName(SERVICE);
- si1.setServiceInstanceUuid(UUID.randomUUID());
- si1.setServiceUuid(UUID.randomUUID());
- si1.setPersonaModelUuid(UUID.randomUUID());
- si1.setWidgetModelUuid(UUID.randomUUID());
+ si1.setServiceInstanceUUID(UUID.randomUUID());
+ si1.setServiceUUID(UUID.randomUUID());
+ si1.setPersonaModelUUID(UUID.randomUUID());
+ si1.setWidgetModelUUID(UUID.randomUUID());
si1.setWidgetModelVersion(VERSION_333);
si2 = new ServiceInstance(si1);
assertTrue(si1.equals(si2));
@@ -149,10 +149,10 @@ public class ServiceInstanceTest {
si1.setServiceInstanceName(INSTANCE);
si1.setServiceName(SERVICE);
- si1.setServiceInstanceUuid(UUID.randomUUID());
- si1.setServiceUuid(UUID.randomUUID());
- si1.setPersonaModelUuid(UUID.randomUUID());
- si1.setWidgetModelUuid(UUID.randomUUID());
+ si1.setServiceInstanceUUID(UUID.randomUUID());
+ si1.setServiceUUID(UUID.randomUUID());
+ si1.setPersonaModelUUID(UUID.randomUUID());
+ si1.setWidgetModelUUID(UUID.randomUUID());
si1.setWidgetModelVersion(VERSION_333);
si2 = new ServiceInstance(si1);
assertEquals(si1.toString(), si2.toString());
@@ -166,10 +166,10 @@ public class ServiceInstanceTest {
si1.setServiceInstanceName(INSTANCE);
si1.setServiceName(SERVICE);
- si1.setServiceInstanceUuid(UUID.randomUUID());
- si1.setServiceUuid(UUID.randomUUID());
- si1.setPersonaModelUuid(UUID.randomUUID());
- si1.setWidgetModelUuid(UUID.randomUUID());
+ si1.setServiceInstanceUUID(UUID.randomUUID());
+ si1.setServiceUUID(UUID.randomUUID());
+ si1.setPersonaModelUUID(UUID.randomUUID());
+ si1.setWidgetModelUUID(UUID.randomUUID());
si1.setWidgetModelVersion(VERSION_333);
si2 = new ServiceInstance(si1);
assertEquals(si1.hashCode(), si2.hashCode());
diff --git a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java
index dc5d9d3b2..73efbb014 100644
--- a/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java
+++ b/models-interactions/model-impl/sdc/src/test/java/org/onap/policy/sdc/ServiceTest.java
@@ -36,23 +36,23 @@ public class ServiceTest {
@Test
public void testConstructors() {
Service svc = new Service();
- assertEquals(null, svc.getServiceUuid());
- assertEquals(null, svc.getServiceInvariantUuid());
+ assertEquals(null, svc.getServiceUUID());
+ assertEquals(null, svc.getServiceInvariantUUID());
assertEquals(null, svc.getServiceName());
assertEquals(null, svc.getServiceVersion());
UUID uuid = UUID.randomUUID();
svc = new Service(uuid);
- assertEquals(uuid, svc.getServiceUuid());
- assertEquals(null, svc.getServiceInvariantUuid());
+ assertEquals(uuid, svc.getServiceUUID());
+ assertEquals(null, svc.getServiceInvariantUUID());
assertEquals(null, svc.getServiceName());
assertEquals(null, svc.getServiceVersion());
String name = "constTest";
svc = new Service(name);
- assertEquals(null, svc.getServiceUuid());
+ assertEquals(null, svc.getServiceUUID());
assertEquals(name, svc.getServiceName());
- assertEquals(null, svc.getServiceInvariantUuid());
+ assertEquals(null, svc.getServiceInvariantUUID());
assertEquals(null, svc.getServiceVersion());
uuid = UUID.randomUUID();
@@ -60,14 +60,14 @@ public class ServiceTest {
name = "constTestUUID";
String version = "0.0.1";
svc = new Service(uuid, uuidInvariant, name, version);
- assertEquals(uuid, svc.getServiceUuid());
- assertEquals(uuidInvariant, svc.getServiceInvariantUuid());
+ assertEquals(uuid, svc.getServiceUUID());
+ assertEquals(uuidInvariant, svc.getServiceInvariantUUID());
assertEquals(name, svc.getServiceName());
assertEquals(version, svc.getServiceVersion());
Service s2 = new Service(svc);
- assertEquals(uuid, s2.getServiceUuid());
- assertEquals(uuidInvariant, s2.getServiceInvariantUuid());
+ assertEquals(uuid, s2.getServiceUUID());
+ assertEquals(uuidInvariant, s2.getServiceInvariantUUID());
assertEquals(name, s2.getServiceName());
assertEquals(version, s2.getServiceVersion());
}
@@ -76,16 +76,16 @@ public class ServiceTest {
public void testUuid() {
Service svc = new Service();
UUID uuid = UUID.randomUUID();
- svc.setServiceUuid(uuid);
- assertEquals(uuid, svc.getServiceUuid());
+ svc.setServiceUUID(uuid);
+ assertEquals(uuid, svc.getServiceUUID());
}
@Test
public void testInvariantUuid() {
Service svc = new Service();
UUID uuid = UUID.randomUUID();
- svc.setServiceInvariantUuid(uuid);
- assertEquals(uuid, svc.getServiceInvariantUuid());
+ svc.setServiceInvariantUUID(uuid);
+ assertEquals(uuid, svc.getServiceInvariantUUID());
}
@Test