import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.transportpce.common.InstanceIdentifiers;
import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
import org.opendaylight.transportpce.common.network.NetworkTransactionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Disabled("Disabled until network models migration to 13.1 - deserialisation issue with SupportedIfCapability")
@ExtendWith(MockitoExtension.class)
public class TapiConnectivityImplTest extends AbstractTest {
private NetworkListener networkModelListenerImpl;
@Mock
public CatalogDataStoreOperations catalogDataStoreOperations;
+ @Mock
+ private RpcProviderService rpcProviderService;
private static final Logger LOG = LoggerFactory.getLogger(TapiConnectivityImplTest.class);
private static ServiceDataStoreOperations serviceDataStoreOperations;
@Test
void createConnServiceShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
- OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
+ OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(rpcProviderService, pathComputationService,
rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
@Test
void createConnServiceShouldBeSuccessfulWhenPerformPCESuccessful()
throws ExecutionException, InterruptedException {
- OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
+ OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(rpcProviderService, pathComputationService,
rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
@Test
void deleteConnServiceShouldBeFailedWithEmptyInput() throws ExecutionException, InterruptedException {
- OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
+ OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(rpcProviderService, pathComputationService,
rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
@Test
void deleteConnServiceShouldBeFailedWithNonExistService() throws ExecutionException, InterruptedException {
DeleteConnectivityServiceInput input = TapiConnectivityDataUtils.buildConnServiceDeleteInput1();
- OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
+ OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(rpcProviderService, pathComputationService,
rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);
void deleteConnServiceShouldBeSuccessForExistingService() throws ExecutionException, InterruptedException {
when(rendererServiceOperations.serviceDelete(any(), any())).thenReturn(Futures.immediateFuture(any()));
- OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(pathComputationService,
+ OrgOpenroadmServiceService serviceHandler = new ServicehandlerImpl(rpcProviderService, pathComputationService,
rendererServiceOperations, notificationPublishService, pceListenerImpl, rendererListenerImpl,
networkModelListenerImpl, serviceDataStoreOperations, catalogDataStoreOperations);