Author: bvahdat
Date: Sat Apr 27 10:05:29 2013
New Revision: 1476546

URL: http://svn.apache.org/r1476546
Log:
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.11.x/   (props changed)
    camel/branches/camel-2.11.x/components/camel-http/   (props changed)
    camel/branches/camel-2.11.x/components/camel-jms/   (props changed)
    
camel/branches/camel-2.11.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java

Propchange: camel/branches/camel-2.11.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1476448

Propchange: camel/branches/camel-2.11.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Apr 27 10:05:29 2013
@@ -1 +1 @@
-/camel/trunk:1-1468763,1469704,1469819,1470420,1470426-1470427,1470429,1470508,1471293,1471330,1471407-1471408,1471543,1475657,1475677,1475742,1475786,1476113,1476428,1476442,1476502
+/camel/trunk:1-1468763,1469704,1469819,1470420,1470426-1470427,1470429,1470508,1471293,1471330,1471407-1471408,1471543,1475657,1475677,1475742,1475786,1476113,1476428,1476442,1476448,1476502

Propchange: camel/branches/camel-2.11.x/components/camel-http/
------------------------------------------------------------------------------
  Merged /camel/trunk/components/camel-http:r1476448

Propchange: camel/branches/camel-2.11.x/components/camel-jms/
------------------------------------------------------------------------------
  Merged /camel/trunk/components/camel-jms:r1476448

Modified: 
camel/branches/camel-2.11.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.11.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java?rev=1476546&r1=1476545&r2=1476546&view=diff
==============================================================================
--- 
camel/branches/camel-2.11.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java
 (original)
+++ 
camel/branches/camel-2.11.x/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java
 Sat Apr 27 10:05:29 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


Reply via email to