Convert TapiLinkImpl into a Component
[transportpce.git] / tapi / src / test / java / org / opendaylight / transportpce / tapi / connectivity / TapiConnectivityImplTest.java
index bb0ae8789630a0ecdca6eb9cd47fc25b85b09abb..deab1ea8b25b897996076a647d1f38879fec6e13 100644 (file)
@@ -32,9 +32,9 @@ import org.opendaylight.transportpce.common.network.NetworkTransactionService;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
 import org.opendaylight.transportpce.servicehandler.impl.ServicehandlerImpl;
-import org.opendaylight.transportpce.servicehandler.listeners.NetworkModelListenerImpl;
-import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
-import org.opendaylight.transportpce.servicehandler.listeners.RendererListenerImpl;
+import org.opendaylight.transportpce.servicehandler.listeners.NetworkListener;
+import org.opendaylight.transportpce.servicehandler.listeners.PceListener;
+import org.opendaylight.transportpce.servicehandler.listeners.RendererListener;
 import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
 import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
 import org.opendaylight.transportpce.tapi.listeners.TapiPceListenerImpl;
@@ -45,6 +45,7 @@ import org.opendaylight.transportpce.tapi.utils.TapiConnectivityDataUtils;
 import org.opendaylight.transportpce.tapi.utils.TapiContext;
 import org.opendaylight.transportpce.tapi.utils.TapiInitialORMapping;
 import org.opendaylight.transportpce.tapi.utils.TapiLink;
+import org.opendaylight.transportpce.tapi.utils.TapiLinkImpl;
 import org.opendaylight.transportpce.tapi.utils.TapiTopologyDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
 import org.opendaylight.transportpce.test.utils.TopologyDataUtils;
@@ -77,11 +78,11 @@ public class TapiConnectivityImplTest extends AbstractTest {
     @Mock
     private TapiServiceHandlerListenerImpl tapiserviceHandlerListenerImpl;
     @Mock
-    private PceListenerImpl pceListenerImpl;
+    private PceListener pceListenerImpl;
     @Mock
-    private RendererListenerImpl rendererListenerImpl;
+    private RendererListener rendererListenerImpl;
     @Mock
-    private NetworkModelListenerImpl networkModelListenerImpl;
+    private NetworkListener networkModelListenerImpl;
 
     private static final Logger LOG = LoggerFactory.getLogger(TapiConnectivityImplTest.class);
     private static ServiceDataStoreOperations serviceDataStoreOperations;
@@ -110,7 +111,7 @@ public class TapiConnectivityImplTest extends AbstractTest {
             TapiTopologyDataUtils.PORTMAPPING_FILE);
 
         networkTransactionService = new NetworkTransactionImpl(getDataBroker());
-        tapilink = new TapiLink(networkTransactionService);
+        tapilink = new TapiLinkImpl(networkTransactionService);
         serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(getDataStoreContextUtil().getDataBroker());
         tapiContext = new TapiContext(networkTransactionService);
         topologyUtils = new TopologyUtils(networkTransactionService, getDataStoreContextUtil().getDataBroker(),
@@ -125,7 +126,7 @@ public class TapiConnectivityImplTest extends AbstractTest {
 
     @Test
     void createConnServiceShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
-        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(getNewDataBroker(), pathComputationService,
+        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
             rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
             networkModelListenerImpl, serviceDataStoreOperations);
 
@@ -150,7 +151,7 @@ public class TapiConnectivityImplTest extends AbstractTest {
     @Test
     void createConnServiceShouldBeSuccessfulWhenPerformPCESuccessful()
             throws ExecutionException, InterruptedException {
-        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(getNewDataBroker(), pathComputationService,
+        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
             rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
             networkModelListenerImpl, serviceDataStoreOperations);
 
@@ -176,7 +177,7 @@ public class TapiConnectivityImplTest extends AbstractTest {
 
     @Test
     void deleteConnServiceShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
-        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(getNewDataBroker(), pathComputationService,
+        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
             rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
             networkModelListenerImpl, serviceDataStoreOperations);
 
@@ -201,7 +202,7 @@ public class TapiConnectivityImplTest extends AbstractTest {
     @Test
     void deleteConnServiceShouldBeFailedWithNonExistService() throws ExecutionException, InterruptedException {
         DeleteConnectivityServiceInput input = TapiConnectivityDataUtils.buildConnServiceDeleteInput1();
-        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(getNewDataBroker(), pathComputationService,
+        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
             rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
             networkModelListenerImpl, serviceDataStoreOperations);
 
@@ -226,7 +227,7 @@ public class TapiConnectivityImplTest extends AbstractTest {
     void deleteConnServiceShouldBeSuccessForExistingService() throws ExecutionException, InterruptedException {
         when(rendererServiceOperations.serviceDelete(any(), any())).thenReturn(Futures.immediateFuture(any()));
 
-        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(getNewDataBroker(), pathComputationService,
+        OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
             rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
             networkModelListenerImpl, serviceDataStoreOperations);