diff options
author | ezhil <ezhrajam@in.ibm.com> | 2020-04-09 18:34:22 +0530 |
---|---|---|
committer | Ezhilarasi R <ezhrajam@in.ibm.com> | 2020-04-09 13:36:10 +0000 |
commit | e83896cc31246bd4dfdb37e4bc947de04e270e5f (patch) | |
tree | 709029a9715cfcdabea1bfe7902dc71d751996c6 | |
parent | 54974ab95489cbe6a6e13078459f68d982601d47 (diff) |
ComponentStatusMessage Junit testclass
Issue-ID: CCSDK-2305
Change-Id: If6f7d645f8c83c71403d363d547f98ff4b4ccb68
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
-rw-r--r-- | ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/status/ComponentStatusMessageTest.java | 30 |
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); + } +} |