@Override protected Permission getModel() { Permission model = new Permission(); model.setDataCenter(new DataCenter()); model.getDataCenter().setId(GUIDS[2].toString()); model.setRole(new Role()); model.getRole().setId(GUIDS[3].toString()); return model; }
@Test public void testAddIncompletePermission() throws Exception { Permission model = new Permission(); model.setGroup(new Group()); model.getGroup().setId(GUIDS[1].toString()); model.setRole(new Role()); model.getRole().setId(GUIDS[3].toString()); setUriInfo(setUpBasicUriExpectations()); control.replay(); try { collection.add(model); } catch (WebApplicationException wae) { verifyIncompleteException( wae, "Permission", "add", "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id"); } }