private static void verifyModelWithIso(Cdrom model, String isoPath) {
   assertEquals(Guid.Empty.toString(), model.getId());
   assertTrue(model.isSetVm());
   assertEquals(VM_ID.toString(), model.getVm().getId());
   assertTrue(model.isSetFile());
   assertEquals(isoPath, model.getFile().getId());
 }
예제 #2
0
  @Test
  public void testCdRomLinks() throws Exception {
    Cdrom cdrom = new Cdrom();
    cdrom.setId(CDROM_ID);

    cdrom.setVm(new Vm());
    cdrom.getVm().setId(VM_ID);

    LinkHelper.addLinks(cdrom);

    assertEquals(CDROM_HREF, cdrom.getHref());
  }