summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorezhil <ezhrajam@in.ibm.com>2020-04-09 18:34:22 +0530
committerDan Timoney <dtimoney@att.com>2020-04-09 14:12:46 +0000
commitc681d7fd7111cce8d60dbdaa9c93569194ca995d (patch)
tree3382f7a9210f4dce8093c6c905eebd5b4f2ebb3c
parent4fb17591abf625141416fb0a015b02d3dc350c3b (diff)
ComponentStatusMessage Junit testclass
Issue-ID: CCSDK-2305 Change-Id: If6f7d645f8c83c71403d363d547f98ff4b4ccb68 Signed-off-by: ezhil <ezhrajam@in.ibm.com> (cherry picked from commit e83896cc31246bd4dfdb37e4bc947de04e270e5f)
-rw-r--r--ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/status/ComponentStatusMessageTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/status/ComponentStatusMessageTest.java b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/status/ComponentStatusMessageTest.java
new file mode 100644
index 000000000..898596dfa
--- /dev/null
+++ b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/status/ComponentStatusMessageTest.java
@@ -0,0 +1,30 @@
+package org.onap.ccsdk.cds.sdclistener.status;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.ccsdk.cds.sdclistener.status.ComponentStatusMessage;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {ComponentStatusMessageTest.class})
+public class ComponentStatusMessageTest {
+ ComponentStatusMessage componentStatusMsg= new ComponentStatusMessage();
+
+ @Test
+ public void testComponentStatusMessage() {
+ componentStatusMsg.setComponentName("Test");
+ componentStatusMsg.setArtifactUrl("/sdc/v1/artifact");
+ componentStatusMsg.setConsumerID("cds-id-local");
+ componentStatusMsg.setDistributionID("1");
+ componentStatusMsg.setTimeStamp(01022020);
+ assertEquals(componentStatusMsg.getComponentName(), "Test");
+ assertEquals(componentStatusMsg.getArtifactURL(), "/sdc/v1/artifact");
+ assertEquals(componentStatusMsg.getConsumerID(), "cds-id-local");
+ assertEquals(componentStatusMsg.getDistributionID(), "1");
+ assertEquals(componentStatusMsg.getTimeStamp(), 01022020);
+ assertEquals(componentStatusMsg.getTimestamp(), 01022020);
+ }
+}