Skip to content
Snippets Groups Projects
Commit 98541fca authored by Rob Adams's avatar Rob Adams
Browse files

Fix some unit tests using a mock device with fewer dependencies

parent b75c882a
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ import net.floodlightcontroller.devicemanager.IEntityClass;
import net.floodlightcontroller.devicemanager.internal.Device;
import net.floodlightcontroller.devicemanager.internal.DeviceManagerImpl;
import net.floodlightcontroller.devicemanager.internal.Entity;
import net.floodlightcontroller.devicemanager.internal.MockDevice;
/**
* Mock device manager useful for unit tests
......@@ -62,18 +63,18 @@ public class MockDeviceManager extends DeviceManagerImpl {
return learnEntity(macAddress, vlan, ipv4Address,
switchDPID, switchPort, true);
}
/*
@Override
protected Device allocateDevice(Long deviceKey,
Entity entity,
Collection<IEntityClass> entityClasses) {
return new Device(this, deviceKey, entity, entityClasses);
return new MockDevice(this, deviceKey, entity, entityClasses);
}
@Override
protected Device allocateDevice(Device device,
Entity entity,
Collection<IEntityClass> entityClasses) {
return new Device(device, entity, entityClasses);
}*/
return new MockDevice(device, entity, entityClasses);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment