X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=olm%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Folm%2FOlmPowerServiceRpcImplTest.java;h=6fb3cb865abf68ba65b7dd270e807be39c9326ba;hb=f49968974e1477d4fd9cfdd87d867c9ad347678e;hp=a881f2f881e5efe815cd3fb46e1f254d1b5b1e74;hpb=c725528fb8a0b09ce24adac744c888a10cf90f72;p=transportpce.git diff --git a/olm/src/test/java/org/opendaylight/transportpce/olm/OlmPowerServiceRpcImplTest.java b/olm/src/test/java/org/opendaylight/transportpce/olm/OlmPowerServiceRpcImplTest.java index a881f2f88..6fb3cb865 100644 --- a/olm/src/test/java/org/opendaylight/transportpce/olm/OlmPowerServiceRpcImplTest.java +++ b/olm/src/test/java/org/opendaylight/transportpce/olm/OlmPowerServiceRpcImplTest.java @@ -103,7 +103,7 @@ public class OlmPowerServiceRpcImplTest extends AbstractTest { @Before public void setUp() { - this.mountPoint = new MountPointStub(this.getDataBroker()); + this.mountPoint = new MountPointStub(getDataBroker()); this.mountPointService = new MountPointServiceStub(mountPoint); this.deviceTransactionManager = new DeviceTransactionManagerImpl(mountPointService, 3000); this.mappingUtils = Mockito.spy(new MappingUtilsImpl(getDataBroker())); @@ -115,24 +115,23 @@ public class OlmPowerServiceRpcImplTest extends AbstractTest { this.crossConnectImpl710 = new CrossConnectImpl710(deviceTransactionManager); this.crossConnect = new CrossConnectImpl(deviceTransactionManager, this.mappingUtils, this.crossConnectImpl121, this.crossConnectImpl22, this.crossConnectImpl710); + this.portMappingVersion710 = new PortMappingVersion710(getDataBroker(), deviceTransactionManager); + this.portMappingVersion22 = new PortMappingVersion221(getDataBroker(), deviceTransactionManager); + this.portMappingVersion121 = new PortMappingVersion121(getDataBroker(), deviceTransactionManager); + this.portMapping = new PortMappingImpl(getDataBroker(), this.portMappingVersion710, + this.portMappingVersion22, this.portMappingVersion121); this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager); - this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager); - this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager); + this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping, + this.portMappingVersion22); + this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager, this.portMapping, + this.portMappingVersion710); this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager), this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22, this.openRoadmInterfacesImpl710); - this.portMappingVersion710 = - new PortMappingVersion710(getDataBroker(), deviceTransactionManager, this.openRoadmInterfaces); - this.portMappingVersion22 = - new PortMappingVersion221(getDataBroker(), deviceTransactionManager, this.openRoadmInterfaces); - this.portMappingVersion121 = - new PortMappingVersion121(getDataBroker(), deviceTransactionManager, this.openRoadmInterfaces); - this.portMapping = new PortMappingImpl(getDataBroker(), this.portMappingVersion710, - this.portMappingVersion22, this.portMappingVersion121); this.portMapping = Mockito.spy(this.portMapping); - this.powerMgmt = new PowerMgmtImpl(this.getDataBroker(), this.openRoadmInterfaces, this.crossConnect, + this.powerMgmt = new PowerMgmtImpl(getDataBroker(), this.openRoadmInterfaces, this.crossConnect, this.deviceTransactionManager); - this.olmPowerService = new OlmPowerServiceImpl(this.getDataBroker(), this.powerMgmt, + this.olmPowerService = new OlmPowerServiceImpl(getDataBroker(), this.powerMgmt, this.deviceTransactionManager, this.portMapping,mappingUtils,openRoadmInterfaces); this.olmPowerServiceRpc = new OlmPowerServiceRpcImpl(this.olmPowerService); //TODO