Search in sources :

Example 1 with InvalidProperty

use of com.vmware.vim25.InvalidProperty in project SimianArmy by Netflix.

the class VSphereServiceConnectionWithMockedInventoryNavigator method shouldEncapsulateInvalidPropertyException.

@Test(expectedExceptions = AmazonServiceException.class)
public void shouldEncapsulateInvalidPropertyException() throws RemoteException {
    VSphereServiceConnectionWithMockedInventoryNavigator service = new VSphereServiceConnectionWithMockedInventoryNavigator();
    InventoryNavigator inventoryNavigatorMock = service.getInventoryNavigatorMock();
    when(inventoryNavigatorMock.searchManagedEntities(VIRTUAL_MACHINE_TYPE_NAME)).thenThrow(new InvalidProperty());
    service.describeVirtualMachines();
}
Also used : InvalidProperty(com.vmware.vim25.InvalidProperty) InventoryNavigator(com.vmware.vim25.mo.InventoryNavigator) Test(org.testng.annotations.Test)

Aggregations

InvalidProperty (com.vmware.vim25.InvalidProperty)1 InventoryNavigator (com.vmware.vim25.mo.InventoryNavigator)1 Test (org.testng.annotations.Test)1