use of net.floodlightcontroller.core.module.FloodlightModuleContext in project open-kilda by telstra.
the class PathVerificationFlowTest method setUp.
@Before
public void setUp() throws Exception {
logger = LoggerFactory.getLogger(PathVerificationFlowTest.class);
cntx = new FloodlightContext();
FloodlightModuleContext fmc = new FloodlightModuleContext();
fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
swDescription = factory.buildDescStatsReply().build();
swFeatures = factory.buildFeaturesReply().setNBuffers(1000).build();
sw = EasyMock.createMock(IOFSwitch.class);
expect(sw.getId()).andReturn(swDpid).anyTimes();
expect(sw.getOFFactory()).andReturn(factory).anyTimes();
expect(sw.getBuffers()).andReturn(swFeatures.getNBuffers()).anyTimes();
expect(sw.hasAttribute(IOFSwitch.PROP_SUPPORTS_OFPP_TABLE)).andReturn(true).anyTimes();
expect(sw.getSwitchDescription()).andReturn(new SwitchDescription(swDescription)).anyTimes();
expect(sw.isActive()).andReturn(true).anyTimes();
expect(sw.getLatency()).andReturn(U64.of(10L)).anyTimes();
replay(sw);
pvs = new PathVerificationService();
}
Aggregations