@Test public void info() { res = vrouter.info(); assertTrue(res.getErrorMessage(), !res.isError()); assertTrue(vrouter.getName().equals(name)); }
@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); }