X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=nbinotifications%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fnbinotifications%2Fimpl%2FNbiNotificationsImplTest.java;h=ec2a5b38873af4f6e7a4ade1202dffdebfbabd91;hb=23d3099a686a049a387e72e0e34f04f8eb5cba6b;hp=f9a762403bddf993cc1d2d723be3d3bb501173cd;hpb=a61b019dd2078be7732b7f2a4669868977c822b2;p=transportpce.git diff --git a/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/impl/NbiNotificationsImplTest.java b/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/impl/NbiNotificationsImplTest.java index f9a762403..ec2a5b388 100644 --- a/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/impl/NbiNotificationsImplTest.java +++ b/nbinotifications/src/test/java/org/opendaylight/transportpce/nbinotifications/impl/NbiNotificationsImplTest.java @@ -7,13 +7,14 @@ */ package org.opendaylight.transportpce.nbinotifications.impl; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import com.google.common.util.concurrent.ListenableFuture; import java.util.concurrent.ExecutionException; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.opendaylight.transportpce.common.converter.JsonStringConverter; import org.opendaylight.transportpce.common.network.NetworkTransactionImpl; import org.opendaylight.transportpce.common.network.NetworkTransactionService; @@ -39,8 +40,8 @@ public class NbiNotificationsImplTest extends AbstractTest { public static NetworkTransactionService networkTransactionService; private TopicManager topicManager; - @Before - public void setUp() throws ExecutionException, InterruptedException { + @BeforeEach + void setUp() throws ExecutionException, InterruptedException { topicManager = TopicManager.getInstance(); networkTransactionService = new NetworkTransactionImpl(getDataBroker()); JsonStringConverter converter = new JsonStringConverter<>( @@ -57,47 +58,47 @@ public class NbiNotificationsImplTest extends AbstractTest { } @Test - public void getNotificationsServiceEmptyDataTest() throws InterruptedException, ExecutionException { + void getNotificationsServiceEmptyDataTest() throws InterruptedException, ExecutionException { ListenableFuture> result = nbiNotificationsImpl.getNotificationsProcessService( new GetNotificationsProcessServiceInputBuilder().build()); - assertNull("Should be null", result.get().getResult().getNotificationsProcessService()); + assertNull(result.get().getResult().getNotificationsProcessService(), "Should be null"); } @Test - public void getNotificationsServiceTest() throws InterruptedException, ExecutionException { + void getNotificationsServiceTest() throws InterruptedException, ExecutionException { GetNotificationsProcessServiceInputBuilder builder = new GetNotificationsProcessServiceInputBuilder() .setGroupId("groupId") .setIdConsumer("consumerId") .setConnectionType(ConnectionType.Service); ListenableFuture> result = nbiNotificationsImpl.getNotificationsProcessService(builder.build()); - assertNull("Should be null", result.get().getResult().getNotificationsProcessService()); + assertNull(result.get().getResult().getNotificationsProcessService(), "Should be null"); } @Test - public void getNotificationsAlarmServiceTest() throws InterruptedException, ExecutionException { + void getNotificationsAlarmServiceTest() throws InterruptedException, ExecutionException { GetNotificationsAlarmServiceInputBuilder builder = new GetNotificationsAlarmServiceInputBuilder() .setGroupId("groupId") .setIdConsumer("consumerId") .setConnectionType(ConnectionType.Service); ListenableFuture> result = nbiNotificationsImpl.getNotificationsAlarmService(builder.build()); - assertNull("Should be null", result.get().getResult().getNotificationsAlarmService()); + assertNull(result.get().getResult().getNotificationsAlarmService(), "Should be null"); } @Test - public void createTapiNotificationSubscriptionServiceTest() throws InterruptedException, ExecutionException { + void createTapiNotificationSubscriptionServiceTest() throws InterruptedException, ExecutionException { CreateNotificationSubscriptionServiceInputBuilder builder = NotificationServiceDataUtils.buildNotificationSubscriptionServiceInputBuilder(); ListenableFuture> result = nbiNotificationsImpl.createNotificationSubscriptionService(builder.build()); - assertNotNull("Should receive UUID for subscription service", - result.get().getResult().getSubscriptionService().getUuid().toString()); + assertNotNull(result.get().getResult().getSubscriptionService().getUuid().toString(), + "Should receive UUID for subscription service"); } @Test - public void getTapiNotificationsServiceTest() throws InterruptedException, ExecutionException { + void getTapiNotificationsServiceTest() throws InterruptedException, ExecutionException { CreateNotificationSubscriptionServiceInputBuilder builder = NotificationServiceDataUtils.buildNotificationSubscriptionServiceInputBuilder(); ListenableFuture> result = @@ -107,6 +108,6 @@ public class NbiNotificationsImplTest extends AbstractTest { .setSubscriptionIdOrName(result.get().getResult().getSubscriptionService().getUuid().getValue()); ListenableFuture> result1 = nbiNotificationsImpl.getNotificationList(builder1.build()); - assertNull("Should be null", result1.get().getResult().getNotification()); + assertNull(result1.get().getResult().getNotification(), "Should be null"); } }