camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject [2/3] git commit: Add comment to yammer testcase
Date Fri, 28 Jun 2013 19:23:17 GMT
Add comment to yammer testcase


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/53e6e899
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/53e6e899
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/53e6e899

Branch: refs/heads/master
Commit: 53e6e89935011fb79722def975aac07dc082f250
Parents: 247ced1
Author: Jonathan Anstey <janstey@gmail.com>
Authored: Fri Jun 28 15:12:39 2013 -0230
Committer: Jonathan Anstey <janstey@gmail.com>
Committed: Fri Jun 28 16:38:08 2013 -0230

----------------------------------------------------------------------
 .../org/apache/camel/component/yammer/YammerComponentTest.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/53e6e899/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerComponentTest.java
----------------------------------------------------------------------
diff --git a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerComponentTest.java
b/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerComponentTest.java
index a900728..aa3e9f8 100644
--- a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerComponentTest.java
+++ b/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerComponentTest.java
@@ -34,6 +34,9 @@ public class YammerComponentTest extends CamelTestSupport {
     public void setUp() throws Exception {
         super.setUp();
 
+        // All this is to mock out the bit that is actually hitting the yammer.com 
+        // rest api. We just return a bit of static json that was retrieved from 
+        // my own account.
         YammerComponent yc = context.getComponent("yammer", YammerComponent.class);
         YammerConfiguration config = yc.getConfig();
         InputStream is = getClass().getResourceAsStream("/messages.json");
@@ -59,6 +62,7 @@ public class YammerComponentTest extends CamelTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() {
+                // using dummy keys here since we are mocking out calls to yammer.com with
static json; in a real app, please use your own keys!
                 from("yammer:messages?consumerKey=aConsumerKey&consumerSecret=aConsumerSecretKey&accessToken=aAccessToken").to("mock:result");
             }
         };


Mime
View raw message