From: <ro...@us...> - 2009-02-20 13:31:06
|
Revision: 20 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=20&view=rev Author: roekens Date: 2009-02-20 12:49:32 +0000 (Fri, 20 Feb 2009) Log Message: ----------- - fixed RouteBuilder bug, which prevented test running - set wait time for test completion to 2s Modified Paths: -------------- cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/main/resources/META-INF/camel-context.xml cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java Modified: cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/main/resources/META-INF/camel-context.xml =================================================================== --- cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/main/resources/META-INF/camel-context.xml 2009-02-20 11:21:41 UTC (rev 19) +++ cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/main/resources/META-INF/camel-context.xml 2009-02-20 12:49:32 UTC (rev 20) @@ -17,8 +17,6 @@ <bean id="Transformer" class="de.campussource.cse.ContentEnricher" /> <camel:camelContext xmlns="http://activemq.apache.org/camel/schema/spring" id="camelContext"> - <camel:package>de.campussource.cse</camel:package> - <camel:route> <camel:from uri="activemq:StartLsf2CseProcess" /> <camel:to uri="xslt:xslt/lsf2cse.xsl" /> Modified: cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java =================================================================== --- cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java 2009-02-20 11:21:41 UTC (rev 19) +++ cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java 2009-02-20 12:49:32 UTC (rev 20) @@ -16,6 +16,7 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.log4j.Logger; +import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; @@ -38,20 +39,22 @@ CamelContext camelContext; -// protected void setUp(){ -// try { -// camelContext.stop(); -// RouteBuilder builder = new RouteBuilder() { -// public void configure() { -// from("activemq:AccountMessageHansen").to("mock:transformationResult"); -// } -// }; -// camelContext.addRoutes(builder); -// camelContext.start(); -// } catch (Exception e) { -// logger.error("Error setting up test case"); -// } -// } + @Before + public void before(){ + try { + //adding route for testFirstSteps to camel Context + camelContext.stop(); + RouteBuilder builder = new RouteBuilder() { + public void configure() { + from("activemq:AccountMessageHansen").to("mock:transformationResult"); + } + }; + camelContext.addRoutes(builder); + camelContext.start(); + } catch (Exception e) { + logger.error("Error setting up test case"); + } + } @Test @DirtiesContext @@ -66,7 +69,8 @@ logger.debug("Received: " + exchange); } //for building purposes set to NOTsatisfied, test is not working - result.assertIsNotSatisfied(); + result.setResultWaitTime(2000l); + result.assertIsSatisfied(); } public String getLsfSyncMessage(){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |