static void verifyModelSpecific(Nic model, int index) {
   assertEquals(GUIDS[index].toString(), model.getId());
   assertEquals(NAMES[index].toString(), model.getName());
   assertTrue(model.isSetVm());
   assertEquals(INSTANCE_TYPE_ID.toString(), model.getVm().getId());
   assertTrue(model.isSetMac());
   assertEquals(ADDRESSES[2].toString(), model.getMac().getAddress());
 }
Пример #2
0
  @Test
  public void testNicLinks() throws Exception {
    Nic nic = new Nic();
    nic.setId(NIC_ID);

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

    LinkHelper.addLinks(nic);

    assertEquals(NIC_HREF, nic.getHref());
  }