camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From idioma <corda.ila...@gmail.com>
Subject Re: How to get hold of the content of log:message
Date Mon, 14 Nov 2016 11:10:39 GMT
So, I am not sure I am heading towards the right direction, but this is what
I have come up with the following: 

@Test
	public void myTest() throws Exception {
                //Custom component has been instantiated outside the
individual test
		String headerValue= MyComponent.VALUE;
		EmailAddress recipients = new EmailAddress("recipient@example.com");
		template.sendBodyAndHeader("activemq:topic:inbox", recipients.toString(),
headerValue);
		resultEndpoint.assertIsSatisfied();
		resultEndpoint.expectedBodiesReceived(recipients.toString());
		resultEndpoint.expectedHeaderReceived("expected value from header",
headerValue);
		resultEndpoint.expectedMessageCount(1);
	}

The EmailAddress value is a constant in my Component. I am instantiating
that component to get the value of that constant. Is it correct the way I am
actually testing it on the mock endpoint? 

Thank you for your help,

Ilaria



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-get-hold-of-the-content-of-log-message-tp5790064p5790108.html
Sent from the Camel Development mailing list archive at Nabble.com.

Mime
View raw message