Examples of assertIsSatisfied()


Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        // REST/HTTP services can be easily tested with RestAssured:
        // get(context.resolvePropertyPlaceholders("{{restUrl}}")).then().statusCode(204).body(isEmptyOrNullString());
        // given().param("status").get(context.resolvePropertyPlaceholders("{{restUrl}}")).then().statusCode(200).body(equalTo("active"));
        // given().auth().basic("testuser", "testpass").body("hello").when().post(context.resolvePropertyPlaceholders("{{restUrl}}")).then().statusCode(200).body(equalTo("response"));

        resultEndpoint.assertIsSatisfied();
  }
}
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

    protected void testEncryption(String fragment, CamelContext context) throws Exception {
        MockEndpoint resultEndpoint = context.getEndpoint("mock:encrypted", MockEndpoint.class);
        resultEndpoint.setExpectedMessageCount(1);
        context.start();
        sendText(fragment, context);
        resultEndpoint.assertIsSatisfied(100);
        Exchange exchange = resultEndpoint.getExchanges().get(0);
        Document inDoc = getDocumentForInMessage(exchange);
        if (log.isDebugEnabled()) {
            logMessage(exchange, inDoc);
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        MockEndpoint resultEndpoint = context.getEndpoint("mock:decrypted", MockEndpoint.class);
        resultEndpoint.setExpectedMessageCount(1);
        // verify that the message was encrypted before checking that it is decrypted
        testEncryption(fragment, context);

        resultEndpoint.assertIsSatisfied(100);
        Exchange exchange = resultEndpoint.getExchanges().get(0);
        Document inDoc = getDocumentForInMessage(exchange);
        if (log.isDebugEnabled()) {
            logMessage(exchange, inDoc);
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        // When
        producerTemplate.sendBody(from, "msg");

        // Then
        mockEndpoint.assertIsSatisfied();
    }

}
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        String text = tm.getText();
        assertNotNull(text);
       
        template.sendBody("direct:finish", text);
       
        mock.assertIsSatisfied();
        mc.close();

    }

    /**
 
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        String text = tm.getText();
        assertNotNull(text);
       
        template.sendBody("direct:finish", text);
       
        mock.assertIsSatisfied();
        mc.close();

    }

    /**
 
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        MockEndpoint result = getMockEndpoint("mock:result");
        result.expectedMessageCount(1);
        result.expectedBodiesReceived(testMessage);
        result.expectedHeaderReceived(Headers.JOB_ID, jobId);
        result.message(0).header(Headers.JOB_ID).isEqualTo(jobId);
        result.assertIsSatisfied(100);

        verify(client, atLeast(1)).reserve(0);
        verify(client, atLeast(1)).delete(jobId);
    }
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        assertEquals(1000, cappedTestCollection.count());

        addTestRoutes();
        context.startRoute("tailableCursorConsumer1");
        Thread.sleep(1000);
        mock.assertIsSatisfied();
        context.stopRoute("tailableCursorConsumer1");

    }
   
    @Test
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        assertEquals(0, cappedTestCollection.count());

        addTestRoutes();
        context.startRoute("tailableCursorConsumer1");
        Thread.sleep(1000);
        mock.assertIsSatisfied();
        context.stopRoute("tailableCursorConsumer1");

    }
   
    @Test
View Full Code Here

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()

        // start the data pumping
        t.start();
        // before we assert, wait for the data pumping to end
        t.join();
       
        mock.assertIsSatisfied();
        context.stopRoute("tailableCursorConsumer1");

    }
   
    @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.