summaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/onap/sdc/dcae/composition/restmodels/DcaeMinimizedServiceTest.java56
-rw-r--r--src/test/java/org/onap/sdc/dcae/composition/restmodels/canvas/SubCategoryFolderTest.java12
-rw-r--r--src/test/java/org/onap/sdc/dcae/composition/restmodels/ruleeditor/MappingRulesTest.java37
3 files changed, 105 insertions, 0 deletions
diff --git a/src/test/java/org/onap/sdc/dcae/composition/restmodels/DcaeMinimizedServiceTest.java b/src/test/java/org/onap/sdc/dcae/composition/restmodels/DcaeMinimizedServiceTest.java
new file mode 100644
index 0000000..acaaa07
--- /dev/null
+++ b/src/test/java/org/onap/sdc/dcae/composition/restmodels/DcaeMinimizedServiceTest.java
@@ -0,0 +1,56 @@
+package org.onap.sdc.dcae.composition.restmodels;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+public class DcaeMinimizedServiceTest {
+
+ private static final String UUID = "uuid";
+ private static final String NAME = "name";
+ private static final String LAST_UPDATER_USER_ID = "lastUpdaterUserId";
+ private static final String LIFE_CYCLE_STATE = "lifeCycleState";
+ private static final String VERSION = "1.1";
+ private static final String INVARIANT_UUID = "invariantUUID";
+ private DcaeMinimizedService classUnderTest;
+
+ @Before
+ public void setup() {
+ classUnderTest = new DcaeMinimizedService(UUID, NAME,
+ LAST_UPDATER_USER_ID, LIFE_CYCLE_STATE,
+ VERSION, INVARIANT_UUID);
+ }
+
+ @Test
+ public void shouldHaveValidGetters() {
+ assertEquals(UUID, classUnderTest.getUuid());
+ assertEquals(NAME, classUnderTest.getName());
+ assertEquals(LAST_UPDATER_USER_ID, classUnderTest.getLastUpdaterUserId());
+ assertEquals(LIFE_CYCLE_STATE, classUnderTest.getLifeCycleState());
+ assertEquals(VERSION, classUnderTest.getVersion());
+ assertEquals(INVARIANT_UUID, classUnderTest.getInvariantUUID());
+
+ }
+
+ @Test
+ public void shouldHaveValidGettersAndSetters() {
+
+ classUnderTest.setUuid(UUID + "1");
+ classUnderTest.setName(NAME + "1");
+ classUnderTest.setLastUpdaterUserId(LAST_UPDATER_USER_ID + "1");
+ classUnderTest.setLifeCycleState(LIFE_CYCLE_STATE + "1");
+ classUnderTest.setVersion(VERSION + "1");
+ classUnderTest.setInvariantUUID(INVARIANT_UUID + "1");
+
+ assertEquals(UUID + "1", classUnderTest.getUuid());
+ assertEquals(NAME + "1", classUnderTest.getName());
+ assertEquals(LAST_UPDATER_USER_ID + "1", classUnderTest.getLastUpdaterUserId());
+ assertEquals(LIFE_CYCLE_STATE + "1", classUnderTest.getLifeCycleState());
+ assertEquals(VERSION + "1", classUnderTest.getVersion());
+ assertEquals(INVARIANT_UUID + "1", classUnderTest.getInvariantUUID());
+ }
+
+
+}
diff --git a/src/test/java/org/onap/sdc/dcae/composition/restmodels/canvas/SubCategoryFolderTest.java b/src/test/java/org/onap/sdc/dcae/composition/restmodels/canvas/SubCategoryFolderTest.java
new file mode 100644
index 0000000..bc2c2d5
--- /dev/null
+++ b/src/test/java/org/onap/sdc/dcae/composition/restmodels/canvas/SubCategoryFolderTest.java
@@ -0,0 +1,12 @@
+package org.onap.sdc.dcae.composition.restmodels.canvas;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.junit.Assert.assertThat;
+
+public class SubCategoryFolderTest {
+ @Test
+ public void shouldHaveValidGettersAndSetters() {
+ assertThat(DcaeComponentCatalog.SubCategoryFolder.class, hasValidGettersAndSetters()); }
+}
diff --git a/src/test/java/org/onap/sdc/dcae/composition/restmodels/ruleeditor/MappingRulesTest.java b/src/test/java/org/onap/sdc/dcae/composition/restmodels/ruleeditor/MappingRulesTest.java
new file mode 100644
index 0000000..a8a15d3
--- /dev/null
+++ b/src/test/java/org/onap/sdc/dcae/composition/restmodels/ruleeditor/MappingRulesTest.java
@@ -0,0 +1,37 @@
+package org.onap.sdc.dcae.composition.restmodels.ruleeditor;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.sdc.dcae.composition.restmodels.DcaeMinimizedService;
+
+import static org.junit.Assert.assertEquals;
+
+public class MappingRulesTest {
+
+ public static final String ENTRY_PHASE = "entryPhase";
+ public static final String PUBLISH_PHASE = "publishPhase";
+ public static final String VERSION = "1.1";
+ public static final String EVENT_TYPE = "eventType";
+ public static final String NOTIFY_ID = "notifyId";
+ private MappingRules classUnderTest;
+
+ @Before
+ public void setup() {
+ classUnderTest = new MappingRules();
+ }
+
+ @Test
+ public void shouldHaveValidGettersAndSetters() {
+ classUnderTest.setEntryPhase(ENTRY_PHASE);
+ classUnderTest.setPublishPhase(PUBLISH_PHASE);
+ classUnderTest.setVersion(VERSION);
+ classUnderTest.setEventType(EVENT_TYPE);
+ classUnderTest.setNotifyId(NOTIFY_ID);
+
+ assertEquals(ENTRY_PHASE, classUnderTest.getEntryPhase());
+ assertEquals(PUBLISH_PHASE, classUnderTest.getPublishPhase());
+ assertEquals(VERSION, classUnderTest.getVersion());
+ assertEquals(EVENT_TYPE, classUnderTest.getEventType());
+ assertEquals(NOTIFY_ID, classUnderTest.getNotifyId());
+ }
+}