summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-04-09 14:12:34 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-09 14:12:34 +0000
commitb5c61272411e0a53727e9d8c04e9163cb50269d7 (patch)
tree33b2e8e2d077609c6a405349b25c01ec3c40da51
parent07fd1a141654949bd6032b043f3d4784dc25e518 (diff)
parente83896cc31246bd4dfdb37e4bc947de04e270e5f (diff)
Merge "ComponentStatusMessage Junit testclass"
-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);
+ }
+}