Ejemplo n.º 1
0
  private void checkServer(ServerDetails server) {
    // description can be null
    assert server.getCpuCores() > 0 : server;
    assert server.getDiskSizeGB() > 0 : server;
    assert server.getMemorySizeMB() > 0 : server;
    assert server.getCost() != null;
    assert server.getTransferGB() > 0 : server;

    assertNotNull(server.getTemplateName());
    assertNotNull(server.getIps());
  }
Ejemplo n.º 2
0
 @Test
 public void testServerDetails() throws Exception {
   ServerDetails details = client.getServerDetails(testServerId);
   checkServer(details);
   assertEquals("Ubuntu 10.04 LTS 32-bit", details.getTemplateName());
   assertEquals("Falkenberg", details.getDatacenter());
   assertEquals("OpenVZ", details.getPlatform());
   assertEquals(5, details.getDiskSizeGB());
   assertEquals(512, details.getMemorySizeMB());
   assertEquals(1, details.getCpuCores());
   assertEquals(50, details.getTransferGB());
 }