diff options
Diffstat (limited to 'asdc-controller/src/test/java/org/onap/so/asdc/util/NotificationLoggingTest.java')
-rw-r--r-- | asdc-controller/src/test/java/org/onap/so/asdc/util/NotificationLoggingTest.java | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/util/NotificationLoggingTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/util/NotificationLoggingTest.java index 8bd11d9f52..0bdb3a8bab 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/util/NotificationLoggingTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/util/NotificationLoggingTest.java @@ -22,46 +22,45 @@ package org.onap.so.asdc.util; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; - import org.junit.Before; import org.junit.Test; import org.onap.so.asdc.client.test.emulators.NotificationDataImpl; public class NotificationLoggingTest { - private NotificationDataImpl notificationData; - - @Before - public void before() { - notificationData = new NotificationDataImpl(); - } - - @Test - public void logNotificationTest() { - notificationData.setDistributionID("distributionID"); - notificationData.setServiceVersion("123456"); - notificationData.setServiceUUID("serviceUUID"); - notificationData.setWorkloadContext("workloadContext"); - - String response = NotificationLogging.logNotification(notificationData); + private NotificationDataImpl notificationData; + + @Before + public void before() { + notificationData = new NotificationDataImpl(); + } + + @Test + public void logNotificationTest() { + notificationData.setDistributionID("distributionID"); + notificationData.setServiceVersion("123456"); + notificationData.setServiceUUID("serviceUUID"); + notificationData.setWorkloadContext("workloadContext"); + + String response = NotificationLogging.logNotification(notificationData); + + assertTrue(response.contains("ASDC Notification")); + assertTrue(response.contains("ResourcesType not recognized")); + assertTrue(response.contains("ServiceNameNULL")); + assertTrue(response.contains("ServiceUUIDserviceUUID")); + assertTrue(response.contains("ResourcesImplNULL")); + assertTrue(response.contains("ServiceArtifactsType not recognized")); + assertTrue(response.contains("ServiceDescriptionNULL")); + assertTrue(response.contains("DistributionIDdistributionID")); + assertTrue(response.contains("ServiceInvariantUUIDNULL")); + assertTrue(response.contains("WorkloadContextworkloadContext")); + } + + @Test + public void logNotificationNullTest() { + notificationData = null; + + String response = NotificationLogging.logNotification(notificationData); - assertTrue(response.contains("ASDC Notification")); - assertTrue(response.contains("ResourcesType not recognized")); - assertTrue(response.contains("ServiceNameNULL")); - assertTrue(response.contains("ServiceUUIDserviceUUID")); - assertTrue(response.contains("ResourcesImplNULL")); - assertTrue(response.contains("ServiceArtifactsType not recognized")); - assertTrue(response.contains("ServiceDescriptionNULL")); - assertTrue(response.contains("DistributionIDdistributionID")); - assertTrue(response.contains("ServiceInvariantUUIDNULL")); - assertTrue(response.contains("WorkloadContextworkloadContext")); - } - - @Test - public void logNotificationNullTest() { - notificationData = null; - - String response = NotificationLogging.logNotification(notificationData); - - assertEquals("NULL", response); - } + assertEquals("NULL", response); + } } |