src/test/java/edu/ucla/library/bucketeer/verticles/FesterVerticleTest.java
@Test
    public final void testPost(final TestContext aContext) throws IOException {
        final Async asyncTask = aContext.async();
        final Promise<Void> promise = Promise.promise();

        // The handler that runs our test-specific checks
        final Handler<RoutingContext> handler = routingContext -> {
            final Set<FileUpload> uploads = routingContext.fileUploads();
            final FileUpload upload;

            aContext.assertEquals(1, uploads.size());
            upload = uploads.iterator().next();
            aContext.assertEquals("test-job", upload.fileName());

            TestUtils.complete(asyncTask);
        };

        // Configure our promise to send the Fester message when server has started
        configurePromise(promise, aContext);

        // Start the test server this test uses
        startTestServer(handler, promise);
    }
/**
     * Tests posting to the Fester verticle.
     *
     * @param aContext A test context
     * @throws IOException If there is an exception during the post
     */
Tests posting to the Fester verticle.
@param aContext A test context
@throws IOException If there is an exception during the post
Tests posting to the Fester verticle . @param aContext A test context @throws IOException If there is an exception during the post
@Test
    public final void testPost(final TestContext aContext) throws IOException {
        final Async asyncTask = aContext.async();
        final Promise<Void> promise = Promise.promise();
        final Handler<RoutingContext> handler = routingContext -> {
            final Set<FileUpload> uploads = routingContext.fileUploads();
            final FileUpload upload;
            aContext.assertEquals(1, uploads.size());
            upload = uploads.iterator().next();
            aContext.assertEquals("test-job", upload.fileName());
            TestUtils.complete(asyncTask);
        };
        configurePromise(promise, aContext);
        startTestServer(handler, promise);
    }
@ Test public final void testPost ( final TestContext aContext ) throws IOException { final Async asyncTask = aContext . async ( ) ; final Promise < Void > promise = Promise . promise ( ) ; final Handler < RoutingContext > handler = routingContext -> { final Set < FileUpload > uploads = routingContext . fileUploads ( ) ; final FileUpload upload ; aContext . assertEquals ( 1 , uploads . size ( ) ) ; upload = uploads . iterator ( ) . next ( ) ; aContext . assertEquals ( "test-job" , upload . fileName ( ) ) ; TestUtils . complete ( asyncTask ) ; } ; configurePromise ( promise , aContext ) ; startTestServer ( handler , promise ) ; }
Tests posting to the Fester verticle.
Tests posting to the Fester verticle .
// The handler that runs our test-specific checks // Configure our promise to send the Fester message when server has started // Start the test server this test uses