summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-04-09 15:39:56 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-09 15:39:56 +0000
commite58a0a90ab901e537cb85b2cca396216767923e0 (patch)
tree3e593e0a6a894d3a6a6caa2fc3e7c820355dc5c4
parent24a436b2f4800048f3010c34f22cf8dc8db9fe5d (diff)
parentc681d7fd7111cce8d60dbdaa9c93569194ca995d (diff)
Merge "ComponentStatusMessage Junit testclass" into frankfurt
-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);
+ }
+}