/** @throws java.lang.Exception */ @Before public void setUp() throws Exception { res = Host.allocate(client, name, "dummy", "dummy"); int hid = !res.isError() ? Integer.parseInt(res.getMessage()) : -1; host = new Host(hid, client); }
@Test public void allocate() { String name = "allocate_test"; res = Host.allocate(client, name, "im_dummy", "vmm_dummy"); assertTrue(res.getErrorMessage(), !res.isError()); // assertTrue( res.getMessage().equals("0") ); hostPool.info(); boolean found = false; for (Host h : hostPool) { found = found || h.getName().equals(name); } assertTrue(found); }