src/test/java/edu/ucla/library/bucketeer/verticles/FesterVerticleTest.java
private void configurePromise(final Promise<Void> aPromise, final TestContext aContext) {
        aPromise.future().onComplete(future -> {
            try {
                final JsonObject job = new JsonObject(StringUtils.read(new File(TEST_JOB)));
                final JsonObject message = new JsonObject().put(Constants.BATCH_METADATA, job);

                if (future.succeeded()) {
                    myVertx.eventBus().send(FesterVerticle.class.getName(), message);
                } else {
                    aContext.fail(future.cause());
                }
            } catch (final IOException details) {
                aContext.fail(details);
            }
        });
    }
/**
     * This sends a test message to our FesterVerticle if the server has been started successfully.
     *
     * @param aPromise A promise that sends the test message
     * @param aContext A testing context
     */
This sends a test message to our FesterVerticle if the server has been started successfully.
@param aPromise A promise that sends the test message
@param aContext A testing context
This sends a test message to our FesterVerticle if the server has been started successfully . @param aPromise A promise that sends the test message @param aContext A testing context
private void configurePromise(final Promise<Void> aPromise, final TestContext aContext) {
        aPromise.future().onComplete(future -> {
            try {
                final JsonObject job = new JsonObject(StringUtils.read(new File(TEST_JOB)));
                final JsonObject message = new JsonObject().put(Constants.BATCH_METADATA, job);
                if (future.succeeded()) {
                    myVertx.eventBus().send(FesterVerticle.class.getName(), message);
                } else {
                    aContext.fail(future.cause());
                }
            } catch (final IOException details) {
                aContext.fail(details);
            }
        });
    }
private void configurePromise ( final Promise < Void > aPromise , final TestContext aContext ) { aPromise . future ( ) . onComplete ( future -> { try { final JsonObject job = new JsonObject ( StringUtils . read ( new File ( TEST_JOB ) ) ) ; final JsonObject message = new JsonObject ( ) . put ( Constants . BATCH_METADATA , job ) ; if ( future . succeeded ( ) ) { myVertx . eventBus ( ) . send ( FesterVerticle . class . getName ( ) , message ) ; } else { aContext . fail ( future . cause ( ) ) ; } } catch ( final IOException details ) { aContext . fail ( details ) ; } } ) ; }
This sends a test message to our FesterVerticle if the server has been started successfully.
This sends a test message to our FesterVerticle if the server has been started successfully .