@Override public void validateDefaultRepresentation() throws Exception { super.validateDefaultRepresentation(); assertPropPresent("ingredients"); }
@Override public void validateFullRepresentation() throws Exception { super.validateFullRepresentation(); assertPropPresent("resources"); }
@Override public void validateRefRepresentation() throws Exception { super.validateRefRepresentation(); }
/** * Validates DefaultRepresentation of the object returned by the resource. * <p> * Tests the value of the uuid property and the presence of the links property. * * @throws Exception */ public void validateDefaultRepresentation() throws Exception { assertPropEquals("uuid", getUuidProperty()); assertPropPresent("links"); assertPropPresent("resourceVersion"); }
/** * Tests {@link Representation#FULL} * * @throws Exception */ @Test public void asRepresentation_shouldReturnValidFullRepresentation() throws Exception { representation = getFullRepresentation(); validateFullRepresentation(); }
/** * Tests {@link Representation#REF} * * @throws Exception */ @Test public void asRepresentation_shouldReturnValidRefRepresentation() throws Exception { representation = newRefRepresentation(); validateRefRepresentation(); }
/** * Validates RefRepresentation of the object returned by the resource. * <p> * Tests the value of the uuid and display property and the presence of a self link in the links * property. * * @throws Exception */ public void validateRefRepresentation() throws Exception { assertPropEquals("uuid", getUuidProperty()); assertPropEquals("display", getDisplayProperty()); assertPropPresent("links"); assertPropNotPresent("resourceVersion"); @SuppressWarnings("unchecked") List<Hyperlink> links = (List<Hyperlink>) getRepresentation().get("links"); boolean self = false; for (Hyperlink link : links) { if (link.getRel().equals("self")) { Assert.assertNotNull(link.getUri()); self = true; break; } } Assert.assertTrue(self); }
/** * Validates FullRepresentation of the object returned by the resource. * <p> * Tests the value of the uuid property and the presence of the links property. * * @throws Exception */ public void validateFullRepresentation() throws Exception { assertPropEquals("uuid", getUuidProperty()); assertPropPresent("links"); assertPropPresent("resourceVersion"); }
@Override public void validateDefaultRepresentation() throws Exception { super.validateDefaultRepresentation(); assertPropPresent("resources"); }
@Override public void validateFullRepresentation() throws Exception { super.validateFullRepresentation(); assertPropPresent("patient"); }
@Override public void validateRefRepresentation() throws Exception { super.validateRefRepresentation(); }
@Override public void validateDefaultRepresentation() throws Exception { super.validateDefaultRepresentation(); assertPropPresent("patient"); }
@Override public void validateFullRepresentation() throws Exception { super.validateFullRepresentation(); assertPropPresent("attributes"); }
@Override public void validateRefRepresentation() throws Exception { super.validateRefRepresentation(); assertPropEquals("retired", getObject().isRetired()); }
@Override public void validateDefaultRepresentation() throws Exception { super.validateDefaultRepresentation(); assertPropPresent("attributes"); }
@Override public void validateFullRepresentation() throws Exception { super.validateFullRepresentation(); assertPropPresent("ingredients"); }
@Override public void validateRefRepresentation() throws Exception { super.validateRefRepresentation(); assertPropEquals("retired", getObject().getRetired()); assertPropPresent("concept"); }
@Override public void validateDefaultRepresentation() throws Exception { super.validateDefaultRepresentation(); assertPropPresent("formFieldPath"); assertPropPresent("formFieldNamespace"); }
@Override public void validateFullRepresentation() throws Exception { super.validateFullRepresentation(); assertPropPresent("formFieldPath"); assertPropPresent("formFieldNamespace"); }
@Override public void validateRefRepresentation() throws Exception { super.validateRefRepresentation(); assertPropEquals("retired", getObject().getRetired()); assertPropPresent("concept"); }