/** * Verify that an anonymous user cannot read the child of a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot read the child of a protected resource") default void testCanReadProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild()).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot control the child of a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot control the child of a protected resource") default void testCanControlProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot read the child of a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot read the child of a protected resource") default void testCanReadProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild()).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot control the child of a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot control the child of a protected resource") default void testCanControlProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild() + EXT_ACL).request().get()) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }
/** * Verify that an anonymous user cannot write to the child of a protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to the child of a protected resource") default void testCanWriteProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild()).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 protected resource. */ @Test @DisplayName("Verify that an anonymous user cannot write to the child of a protected resource") default void testCanWriteProtectedResourceChild() { try (final Response res = target(getProtectedContainerChild()).request().method(PATCH, entity(INSERT_PROP_BAR, APPLICATION_SPARQL_UPDATE))) { assertEquals(UNAUTHORIZED, fromStatusCode(res.getStatus()), UNAUTHORIZED_RESPONSE); } }