camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: JUnit json
Date Sun, 01 Mar 2015 13:43:50 GMT
Please use the users mailing list for such questions.

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642

On Thu, Feb 26, 2015 at 8:15 AM, meenakshisekar <
meenakshi.chandrasekar@imaginea.com> wrote:

> Hi,
>
> I'm starting with camel on Junit for my sample code. Would like to
> understand how to implement it for Json based case.
>
> My class looks like this,
>
> @Override
> public void configure() throws Exception {
>                 from("jetty:http://0.0.0.0:8080/content")
>                 .choice()
>                         .when(header("service").isEqualTo("XXXXX"))
>
> .to("
> http://localhost:4567/test.json?bridgeEndpoint=true&amp;throwExceptionOnFailure=false
> ")
>                         .otherwise()
>
> .to("
> http://localhost:5000/order?bridgeEndpoint=true&throwExceptionOnFailure=false
> ");
>
>         }
>
> the structure of my Junit class looks like this, let me know on what has to
> be tested in test(testSendMatchingMessage)
>
> method.
>
> public class GLEndpointTest extends CamelTestSupport{
>
>
>     @EndpointInject(uri = "mock:result")
>     protected MockEndpoint resultEndpoint;
>
>     @Produce(uri = "direct:start")
>     protected ProducerTemplate template;
>
>     @Before
>     public void setup() throws Exception {
>        super.setUp();
>      context.addRoutes(new ContentBased());
>         }
>
>
>   @Override
>     protected RouteBuilder createRouteBuilder() {
>         return new RouteBuilder() {
>             public void configure() {
>
> from("http://localhost:8080/content?service=customer").to("mock:result");
>
>             }
>         };
>     }
>
>
> * @Test
>     public void testSendMatchingMessage() throws Exception {
>        ???????
>     }*
>
> }
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JUnit-json-tp5763189.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message