/** * Verify that an anonymous user can read the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user can read the child of a public resource") default void testCanReadPublicResourceChild() { try (final Response res = target(getPublicContainerChild()).request().get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that an anonymous user cannot control the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot control the child of a public resource") default void testCanControlPublicResourceChild() { try (final Response res = target(getPublicContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot control the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot control the child of a public resource") default void testCanControlPublicResourceChild() { try (final Response res = target(getPublicContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user can read the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user can read the child of a public resource") default void testCanReadPublicResourceChild() { try (final Response res = target(getPublicContainerChild()).request().get()) { assertEquals(SUCCESSFUL, res.getStatusInfo().getFamily(), OK_RESPONSE); } }
/** * Verify that an anonymous user cannot write to the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to the child of a public resource") default void testCanWritePublicResourceChild() { try (final Response res = target(getPublicContainerChild()).request().method(PATCH, entity(INSERT_PROP_BAR, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot write to the child of a public resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to the child of a public resource") default void testCanWritePublicResourceChild() { try (final Response res = target(getPublicContainerChild()).request().method(PATCH, entity(INSERT_PROP_BAR, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }