X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tapi%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Ftapi%2Ftopology%2FTapiTopologyImplExceptionTest.java;h=7fb3b598f1a347eb8921fe8f64338ccab12fd141;hb=e25f274098143d1171db8072a8b6091fb97b8e4a;hp=9f4f466e73e0ed9a37fe76e736cb3dcc3ab090e2;hpb=02120b6f30aece5acfa0fba69419c6b65f0f1659;p=transportpce.git diff --git a/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java b/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java index 9f4f466e7..7fb3b598f 100644 --- a/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java +++ b/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java @@ -7,7 +7,7 @@ */ package org.opendaylight.transportpce.tapi.topology; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -17,7 +17,7 @@ import com.google.common.util.concurrent.ListenableFuture; import java.util.Optional; import java.util.concurrent.ExecutionException; import org.eclipse.jdt.annotation.NonNull; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -29,6 +29,7 @@ import org.opendaylight.transportpce.common.network.NetworkTransactionService; import org.opendaylight.transportpce.tapi.TapiStringConstants; import org.opendaylight.transportpce.tapi.utils.TapiContext; import org.opendaylight.transportpce.tapi.utils.TapiLink; +import org.opendaylight.transportpce.tapi.utils.TapiLinkImpl; import org.opendaylight.transportpce.tapi.utils.TapiTopologyDataUtils; import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.GetTopologyDetailsInput; import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.GetTopologyDetailsOutput; @@ -39,14 +40,14 @@ import org.opendaylight.yangtools.yang.common.RpcResult; public class TapiTopologyImplExceptionTest { @Mock - TapiContext tapiContext; + private TapiContext tapiContext; @Mock - TopologyUtils topologyUtils; + private TopologyUtils topologyUtils; @Mock - TapiLink tapiLink; + private TapiLink tapiLink; @Test - public void getTopologyDetailsWithExceptionTest() throws InterruptedException, ExecutionException { + void getTopologyDetailsWithExceptionTest() throws InterruptedException, ExecutionException { DataBroker dataBroker = mock(DataBroker.class); when(dataBroker.newReadOnlyTransaction()) .thenReturn(new ReadTransactionMock()); @@ -61,7 +62,7 @@ public class TapiTopologyImplExceptionTest { }; when(networkTransactionService.commit()).then(answer); tapiContext = new TapiContext(networkTransactionService); - tapiLink = new TapiLink(networkTransactionService); + tapiLink = new TapiLinkImpl(networkTransactionService); GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput( TapiStringConstants.T0_MULTILAYER); @@ -70,9 +71,9 @@ public class TapiTopologyImplExceptionTest { RpcResult rpcResult = result.get(); if (rpcResult.isSuccessful()) { Topology topology = rpcResult.getResult().getTopology(); - assertNull("Topology should be null", topology); + assertNull(topology, "Topology should be null"); } else { - assertNull("Topology should be null", null); + assertNull(null, "Topology should be null"); } } @@ -102,5 +103,4 @@ public class TapiTopologyImplExceptionTest { // TODO Auto-generated method stub } } - -} +} \ No newline at end of file