Search in sources :

Example 1 with ListNuageVspDevicesCmd

use of com.cloud.api.commands.ListNuageVspDevicesCmd in project cloudstack by apache.

the class NuageVspManagerTest method testListNuageVspDevices.

@Test
public void testListNuageVspDevices() {
    final NuageVspDeviceVO nuageVspDevice = mock(NuageVspDeviceVO.class);
    when(nuageVspDevice.getPhysicalNetworkId()).thenReturn(NETWORK_ID);
    final PhysicalNetworkVO phyNtwkVO = mock(PhysicalNetworkVO.class);
    when(_physicalNetworkDao.findById(NETWORK_ID)).thenReturn(phyNtwkVO);
    when(_nuageVspDao.listByPhysicalNetwork(NETWORK_ID)).thenReturn(new ArrayList<NuageVspDeviceVO>());
    final ListNuageVspDevicesCmd cmd = mock(ListNuageVspDevicesCmd.class);
    when(cmd.getPhysicalNetworkId()).thenReturn(NETWORK_ID);
    when(cmd.getNuageVspDeviceId()).thenReturn(null);
    _nuageVspManager.listNuageVspDevices(cmd);
}
Also used : NuageVspDeviceVO(com.cloud.network.NuageVspDeviceVO) PhysicalNetworkVO(com.cloud.network.dao.PhysicalNetworkVO) ListNuageVspDevicesCmd(com.cloud.api.commands.ListNuageVspDevicesCmd) NuageTest(com.cloud.NuageTest) Test(org.junit.Test)

Aggregations

NuageTest (com.cloud.NuageTest)1 ListNuageVspDevicesCmd (com.cloud.api.commands.ListNuageVspDevicesCmd)1 NuageVspDeviceVO (com.cloud.network.NuageVspDeviceVO)1 PhysicalNetworkVO (com.cloud.network.dao.PhysicalNetworkVO)1 Test (org.junit.Test)1