use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager in project openflowplugin by opendaylight.
the class SalFlowServiceImplTest method mockSalFlowService.
private SalFlowServiceImpl mockSalFlowService(final short version) {
when(mockedFeatures.getVersion()).thenReturn(version);
when(mockedFeaturesOutput.getVersion()).thenReturn(version);
when(mockedDeviceInfo.getVersion()).thenReturn(version);
final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
return new SalFlowServiceImpl(mockedRequestContextStack, mockedDeviceContext, convertorManager);
}
use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager in project openflowplugin by opendaylight.
the class SalGroupServiceImplTest method setup.
@Override
protected void setup() {
when(mockedDeviceContext.getDeviceGroupRegistry()).thenReturn(mockedDeviceGroupRegistry);
final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
salGroupService = new SalGroupServiceImpl(mockedRequestContextStack, mockedDeviceContext, convertorManager);
}
use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager in project openflowplugin by opendaylight.
the class SalMeterServiceImplTest method setup.
@Override
protected void setup() {
when(mockedDeviceContext.getDeviceMeterRegistry()).thenReturn(mockedDeviceMeterRegistry);
final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
salMeterService = new SalMeterServiceImpl(mockedRequestContextStack, mockedDeviceContext, convertorManager);
}
use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager in project openflowplugin by opendaylight.
the class SalPortServiceImplTest method setup.
@Override
protected void setup() {
final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
salPortService = new SalPortServiceImpl(mockedRequestContextStack, mockedDeviceContext, convertorManager);
}
use of org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager in project openflowplugin by opendaylight.
the class SalTableServiceImplTest method setup.
@Override
public void setup() {
handleResultFuture = SettableFuture.create();
when(mockedRequestContext.getFuture()).thenReturn(handleResultFuture);
Mockito.doAnswer((Answer<Void>) invocation -> {
final FutureCallback<OfHeader> callback = (FutureCallback<OfHeader>) invocation.getArguments()[2];
callback.onSuccess(null);
return null;
}).when(mockedOutboundQueue).commitEntry(Matchers.anyLong(), Matchers.<OfHeader>any(), Matchers.<FutureCallback<OfHeader>>any());
final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
salTableService = new SalTableServiceImpl(mockedRequestContextStack, mockedDeviceContext, convertorManager, MultipartWriterProviderFactory.createDefaultProvider(mockedDeviceContext));
}
Aggregations