@Test public void delete() { res = vrouter.delete(); assertTrue(res.getErrorMessage(), !res.isError()); res = vrouter.info(); assertTrue(res.isError()); }
@Test public void allocate() { vrouter.delete(); res = VirtualRouter.allocate(client, template_str); assertTrue(res.getErrorMessage(), !res.isError()); int oid = res.isError() ? -1 : Integer.parseInt(res.getMessage()); vrouter = new VirtualRouter(oid, client); vrouterPool.info(); boolean found = false; for (VirtualRouter temp : vrouterPool) { found = found || temp.getName().equals(name); } assertTrue(found); }
/** @throws java.lang.Exception */ @After public void tearDown() throws Exception { vrouter.delete(); }