Пример #1
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());
 }
Пример #2
0
  @Test
  public void testListServers() throws Exception {
    Set<Server> response = client.listServers();
    assertNotNull(response);
    assertTrue(response.size() > 0);

    for (Server server : response) {
      ServerDetails newDetails = client.getServerDetails(server.getId());
      assertEquals(newDetails.getId(), server.getId());
      assertEquals(newDetails.getHostname(), server.getHostname());
      assertEquals(newDetails.getPlatform(), server.getPlatform());
      assertEquals(newDetails.getDatacenter(), server.getDatacenter());
      checkServer(newDetails);
    }
  }