You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/02/11 06:03:26 UTC

[camel] branch master updated: CAMEL-13176: Deleted tests not relevant anymore.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e4df8e  CAMEL-13176: Deleted tests not relevant anymore.
2e4df8e is described below

commit 2e4df8e4828377cff64620d0bba2e5c3381b732f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Feb 11 07:03:13 2019 +0100

    CAMEL-13176: Deleted tests not relevant anymore.
---
 .../src/main/docs/yammer-component.adoc            | 39 +++++----------
 .../YammerRelationshipConsumerOptionTest.java      | 42 -----------------
 .../yammer/YammerRelationshipInJsonRouteTest.java  | 53 ---------------------
 .../yammer/YammerRelationshipRouteTest.java        | 55 ----------------------
 4 files changed, 11 insertions(+), 178 deletions(-)

diff --git a/components/camel-yammer/src/main/docs/yammer-component.adoc b/components/camel-yammer/src/main/docs/yammer-component.adoc
index c029895..4d0271d 100644
--- a/components/camel-yammer/src/main/docs/yammer-component.adoc
+++ b/components/camel-yammer/src/main/docs/yammer-component.adoc
@@ -5,7 +5,7 @@
 
 The Yammer component allows you to interact with the
 https://www.yammer.com[Yammer] enterprise social network. Consuming
-messages, users, and user relationships is supported as well as creating
+messages and users is supported as well as creating
 new messages.
 
 Yammer uses OAuth 2 for all client application authentication. In order
@@ -26,14 +26,14 @@ for this component:
 </dependency>
 ----
 
-### URI format
+=== URI format
 
 [source]
 ----
 yammer:[function]?[options]
 ----
 
-### Component options
+=== Component options
 
 The Yammer component can be configured with the Yammer account settings
 which are mandatory to configure before using.
@@ -62,7 +62,7 @@ The Yammer component supports 5 options, which are listed below.
 
 You can also configure these options directly in the endpoint.
 
-### Endpoint options
+=== Endpoint options
 
 
 
@@ -155,9 +155,7 @@ The component supports 18 options, which are listed below.
 
 
 
-
-
-### Consuming messages
+=== Consuming messages
 
 The Yammer component provides several endpoints for consuming
 messages:
@@ -188,7 +186,7 @@ and topics that the user is following.
 |=======================================================================
 
 
-#### Message format
+==== Message format
 
 All messages by default are converted to a POJO model provided in the
 `org.apache.camel.component.yammer.model` package. The original message
@@ -297,7 +295,7 @@ That said, marshaling this data into POJOs is not free so if you need
 you can switch back to using pure JSON by adding the `useJson=false`
 option to your URI.
 
-### Creating messages
+=== Creating messages
 
 To create a new message in the account of the current user, you can use
 the following URI:
@@ -342,17 +340,8 @@ assertEquals(1, messages.getMessages().size());
 assertEquals("Hi from Camel!", messages.getMessages().get(0).getBody().getPlain());
 ----
 
-### Retrieving user relationships
 
-The Yammer component can retrieve user relationships:
-
-[source]
-----
-yammer:relationships?[options]
-----
-
-
-### Retrieving users
+=== Retrieving users
 
 The Yammer component provides several endpoints for retrieving
 users:
@@ -367,10 +356,10 @@ users:
 |=====================================================
 
 
-### Using an enricher
+=== Using an enricher
 
-It is helpful sometimes (or maybe always in the case of users or
-relationship consumers) to use an enricher pattern rather than a route
+It is helpful sometimes (or maybe always in the case of users
+to use an enricher pattern rather than a route
 initiated with one of the polling consumers in camel-yammer. This is
 because the consumers will fire repeatedly, however often you set the
 delay for. If you just want to look up a user's data, or grab a message
@@ -391,9 +380,3 @@ from("direct:start")
 This will go out and fetch the current user's `User` object and set it as
 the Camel message body.
 
-### See Also
-
-* Configuring Camel
-* Component
-* Endpoint
-* Getting Started
diff --git a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipConsumerOptionTest.java b/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipConsumerOptionTest.java
deleted file mode 100644
index 8f31f60..0000000
--- a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipConsumerOptionTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.yammer;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class YammerRelationshipConsumerOptionTest extends YammerComponentTestSupport {
-
-    private static final String YAMMER_RELATIONSHIPS_CONSUMER = "yammer:relationships?consumerKey=aConsumerKey&consumerSecret=aConsumerSecretKey&accessToken=aAccessToken&userId=jcamel";
-
-    @Test
-    public void testOptions() throws Exception {
-        YammerEndpoint endpoint = context.getEndpoint(YAMMER_RELATIONSHIPS_CONSUMER, YammerEndpoint.class);
-        
-        // now check if options got applied
-        assertEquals("jcamel", endpoint.getConfig().getUserId());
-    }
-    
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() {
-                from(YAMMER_RELATIONSHIPS_CONSUMER).to("mock:result");
-            }
-        };
-    }
-}
diff --git a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipInJsonRouteTest.java b/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipInJsonRouteTest.java
deleted file mode 100644
index 51b6ca2..0000000
--- a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipInJsonRouteTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.yammer;
-
-
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Test;
-
-public class YammerRelationshipInJsonRouteTest extends YammerComponentTestSupport {
-   
-    @Test
-    public void testConsumeAllUsers() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMinimumMessageCount(1);
-        assertMockEndpointsSatisfied();
-        
-        Exchange exchange = mock.getExchanges().get(0);
-        String relationships = exchange.getIn().getBody(String.class);
-        
-        assertEquals(getMessages(), relationships);
-    }
-
-    @Override
-    protected String jsonFile() {
-        return "/relationships.json";
-    }
-       
-    @Override
-    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:relationships?consumerKey=aConsumerKey&consumerSecret=aConsumerSecretKey&accessToken=aAccessToken&useJson=true").to("mock:result");
-            }
-        };
-    }
-}
diff --git a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipRouteTest.java b/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipRouteTest.java
deleted file mode 100644
index c51117f..0000000
--- a/components/camel-yammer/src/test/java/org/apache/camel/component/yammer/YammerRelationshipRouteTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.yammer;
-
-
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.component.yammer.model.Relationships;
-import org.junit.Test;
-
-public class YammerRelationshipRouteTest extends YammerComponentTestSupport {
-
-    @Test
-    public void testConsumeAllUsers() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMinimumMessageCount(1);
-        assertMockEndpointsSatisfied();
-        
-        Exchange exchange = mock.getExchanges().get(0);
-        Relationships relationships = exchange.getIn().getBody(Relationships.class);
-
-        assertEquals(1, relationships.getSuperiors().size());
-        assertEquals("Joe Camel", relationships.getSuperiors().get(0).getFullName());        
-    }
-
-    @Override
-    protected String jsonFile() {
-        return "/relationships.json";
-    }
-       
-    @Override
-    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:relationships?consumerKey=aConsumerKey&consumerSecret=aConsumerSecretKey&accessToken=aAccessToken").to("mock:result");
-            }
-        };
-    }
-}