Author: bvahdat Date: Sat Apr 27 10:07:24 2013 New Revision: 1476548 URL: http://svn.apache.org/r1476548 Log: Merged revisions 1476546 via svnmerge from https://svn.apache.org/repos/asf/camel/branches/camel-2.11.x
................ r1476546 | bvahdat | 2013-04-27 12:05:29 +0200 (Sa, 27 Apr 2013) | 9 lines Merged revisions 1476448 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk ........ r1476448 | bvahdat | 2013-04-27 01:18:01 +0200 (Sa, 27 Apr 2013) | 1 line Polished. ........ ................ Modified: camel/branches/camel-2.10.x/ (props changed) camel/branches/camel-2.10.x/components/camel-http/ (props changed) camel/branches/camel-2.10.x/components/camel-jms/ (props changed) camel/branches/camel-2.10.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Merged /camel/trunk:r1476448 Merged /camel/branches/camel-2.11.x:r1476546 Propchange: camel/branches/camel-2.10.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Propchange: camel/branches/camel-2.10.x/components/camel-http/ ------------------------------------------------------------------------------ svn:mergeinfo = /camel/trunk/components/camel-http:1476448 Propchange: camel/branches/camel-2.10.x/components/camel-jms/ ------------------------------------------------------------------------------ svn:mergeinfo = /camel/trunk/components/camel-jms:1476448 Modified: camel/branches/camel-2.10.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java?rev=1476548&r1=1476547&r2=1476548&view=diff ============================================================================== --- camel/branches/camel-2.10.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java (original) +++ camel/branches/camel-2.10.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java Sat Apr 27 10:07:24 2013 @@ -16,8 +16,6 @@ */ package org.apache.camel.test.blueprint; -import org.junit.Assert; - import org.apache.camel.Exchange; import org.apache.camel.model.ProcessorDefinition; import org.junit.Test; @@ -27,9 +25,8 @@ import org.junit.Test; // and add your unit tests methods as shown below. public class DebugBlueprintTest extends CamelBlueprintTestSupport { - public boolean wasDebugBeforeCalled = false; - public boolean wasDebugAfterCalled = false; - + private boolean debugBeforeMethodCalled; + private boolean debugAfterMethodCalled; // override this method, and return the location of our Blueprint XML file to be used for testing @Override @@ -37,7 +34,7 @@ public class DebugBlueprintTest extends return "org/apache/camel/test/blueprint/camelContext.xml"; } - // here we have regular Junit @Test method + // here we have regular JUnit @Test method @Test public void testRoute() throws Exception { @@ -49,10 +46,11 @@ public class DebugBlueprintTest extends // assert mocks assertMockEndpointsSatisfied(); - Assert.assertTrue(wasDebugBeforeCalled); - Assert.assertTrue(wasDebugAfterCalled); - } + // assert on the debugBefore/debugAfter methods below being called as we've enabled the debugger + assertTrue(debugBeforeMethodCalled); + assertTrue(debugAfterMethodCalled); + } @Override public boolean isUseDebugger() { @@ -60,18 +58,16 @@ public class DebugBlueprintTest extends return true; } - @Override protected void debugBefore(Exchange exchange, org.apache.camel.Processor processor, ProcessorDefinition<?> definition, String id, String label) { log.info("Before " + definition + " with body " + exchange.getIn().getBody()); - wasDebugBeforeCalled = true; + debugBeforeMethodCalled = true; } - @Override protected void debugAfter(Exchange exchange, org.apache.camel.Processor processor, ProcessorDefinition<?> definition, String id, String label, long timeTaken) { log.info("After " + definition + " with body " + exchange.getIn().getBody()); - wasDebugAfterCalled = true; + debugAfterMethodCalled = true; } } // END SNIPPET: example \ No newline at end of file