コード例 #1
0
  @Test
  public void testWaitForVirtualMachineToBeExpunged() {
    VirtualMachine virtualMachine = VirtualMachine.builder().id("229").build();
    expect(virtualMachineClient.getVirtualMachine(virtualMachine.getId())).andReturn(null);

    replay(client, virtualMachineClient);
    assertTrue(new VirtualMachineExpunged(client).apply(virtualMachine));
    verify(client, virtualMachineClient);
  }
コード例 #2
0
  @Test
  public void testNoRemovedYet() {
    VirtualMachine virtualMachine = VirtualMachine.builder().id("229").build();
    expect(virtualMachineClient.getVirtualMachine(virtualMachine.getId()))
        .andReturn(virtualMachine);

    replay(client, virtualMachineClient);
    assertFalse(new VirtualMachineExpunged(client).apply(virtualMachine));
    verify(client, virtualMachineClient);
  }