use of com.cloud.network.bigswitch.Capabilities in project cloudstack by apache.
the class BigSwitchBcfResourceTest method testPingCommandStatusOk.
@Test
public void testPingCommandStatusOk() throws ConfigurationException, BigSwitchBcfApiException {
_resource.configure("BigSwitchBcfResource", _parameters);
ControlClusterStatus ccs = mock(ControlClusterStatus.class);
when(ccs.getStatus()).thenReturn(true);
when(_bigswitchBcfApi.getControlClusterStatus()).thenReturn(ccs);
Capabilities cap = mock(Capabilities.class);
when(_bigswitchBcfApi.getCapabilities()).thenReturn(cap);
PingCommand ping = _resource.getCurrentStatus(42);
assertTrue(ping != null);
assertTrue(ping.getHostId() == 42);
assertTrue(ping.getHostType() == Host.Type.L2Networking);
}
Aggregations