src/test/java/edu/ucla/library/iiif/auth/services/DatabaseServiceIT.java
@Test
    final void testGetAccessLevelUnset(final VertxTestContext aContext) {
        final String id = "unset";
        final String expected = NULL;

        myServiceProxy.getAccessLevel(id).onFailure(details -> {
            // The get should fail since nothing has been set for the id
            final ServiceException error = (ServiceException) details;

            assertEquals(DatabaseServiceError.NOT_FOUND, DatabaseServiceImpl.getError(error));
            assertEquals(id, error.getMessage());

            aContext.completeNow();
        }).onSuccess(result -> {
            // The following will always fail
            completeIfExpectedElseFail(result, expected, aContext);
        });
    }
/**
     * Tests reading an item whose "access level" has not been set.
     *
     * @param aContext A test context
     */
Tests reading an item whose "access level" has not been set.
@param aContext A test context
Tests reading an item whose " access level " has not been set . @param aContext A test context
@Test
    final void testGetAccessLevelUnset(final VertxTestContext aContext) {
        final String id = "unset";
        final String expected = NULL;
        myServiceProxy.getAccessLevel(id).onFailure(details -> {
            final ServiceException error = (ServiceException) details;
            assertEquals(DatabaseServiceError.NOT_FOUND, DatabaseServiceImpl.getError(error));
            assertEquals(id, error.getMessage());
            aContext.completeNow();
        }).onSuccess(result -> {
            completeIfExpectedElseFail(result, expected, aContext);
        });
    }
@ Test final void testGetAccessLevelUnset ( final VertxTestContext aContext ) { final String id = "unset" ; final String expected = NULL ; myServiceProxy . getAccessLevel ( id ) . onFailure ( details -> { final ServiceException error = ( ServiceException ) details ; assertEquals ( DatabaseServiceError . NOT_FOUND , DatabaseServiceImpl . getError ( error ) ) ; assertEquals ( id , error . getMessage ( ) ) ; aContext . completeNow ( ) ; } ) . onSuccess ( result -> { completeIfExpectedElseFail ( result , expected , aContext ) ; } ) ; }
Tests reading an item whose "access level" has not been set.
Tests reading an item whose " access level " has not been set .
// The get should fail since nothing has been set for the id // The following will always fail