camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject [15/21] git commit: Unit test updates
Date Mon, 08 Sep 2014 13:57:52 GMT
Unit test updates


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

Branch: refs/heads/master
Commit: 2243e251e0f9426a1a7ae3b0c6fdc2fef78cee8b
Parents: 61df41e
Author: Jonathan Anstey <janstey@gmail.com>
Authored: Wed Sep 3 23:51:46 2014 -0230
Committer: Jonathan Anstey <janstey@gmail.com>
Committed: Mon Sep 8 09:06:10 2014 -0230

----------------------------------------------------------------------
 .../google/drive/GoogleDriveEndpoint.java       |  53 +++++++--
 .../google/drive/DriveAboutIntegrationTest.java |   9 +-
 .../google/drive/DriveAppsIntegrationTest.java  |   9 +-
 .../drive/DriveChangesIntegrationTest.java      |   5 +-
 .../drive/DriveChannelsIntegrationTest.java     |  51 ---------
 .../drive/DriveChildrenIntegrationTest.java     | 111 -------------------
 .../drive/DriveCommentsIntegrationTest.java     |  36 +++++-
 .../google/drive/DriveFilesIntegrationTest.java |   1 -
 .../drive/DriveParentsIntegrationTest.java      | 111 -------------------
 .../drive/DriveRealtimeIntegrationTest.java     |  86 --------------
 10 files changed, 81 insertions(+), 391 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
index 44d4d4b..d61c70d 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
@@ -1,6 +1,8 @@
 package org.apache.camel.component.google.drive;
 
+import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.camel.Consumer;
@@ -38,11 +40,12 @@ public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName,
     private JacksonFactory jsonFactory = new JacksonFactory();
     private FileDataStoreFactory dataStoreFactory;
     
-    // Directory to store user credentials
+    // TODO Directory to store user credentials
     private static final java.io.File DATA_STORE_DIR = new java.io.File(
-        System.getProperty("user.home"), ".store/drive_sample");
-    
+        System.getProperty("user.home"), ".store/drive_sample");    
 
+    private static final List<String> DEFAULT_SCOPES = Arrays.asList(DriveScopes.DRIVE_FILE,
DriveScopes.DRIVE_APPS_READONLY, DriveScopes.DRIVE_METADATA_READONLY,
+            DriveScopes.DRIVE);    
     
     public GoogleDriveEndpoint(String uri, GoogleDriveComponent component,
                          GoogleDriveApiName apiName, String methodName, GoogleDriveConfiguration
endpointConfiguration) {
@@ -78,10 +81,10 @@ public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName,
     private Credential authorize() throws Exception {
       dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);
       // set up authorization code flow
-      // TODO refresh token support too
-      GoogleAuthorizationCodeFlow flow =
+      // TODO refresh token support too      
+    GoogleAuthorizationCodeFlow flow =
           new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, configuration.getClientId(),
configuration.getClientSecret(),
-              Collections.singleton(DriveScopes.DRIVE_FILE)).setDataStoreFactory(dataStoreFactory)
+                  DEFAULT_SCOPES).setDataStoreFactory(dataStoreFactory)
               .build();
       // authorize
       return new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("user");
@@ -96,7 +99,43 @@ public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName,
             case DRIVE_FILES:
                 apiProxy = getClient().files();
                 break;
-                // TODO add extra APIs here
+            case DRIVE_ABOUT:
+                apiProxy = getClient().about();
+                break;                
+            case DRIVE_APPS:
+                apiProxy = getClient().apps();
+                break;         
+            case DRIVE_CHANGES:
+                apiProxy = getClient().changes();
+                break;                
+            case DRIVE_COMMENTS:
+                apiProxy = getClient().comments();
+                break;                
+            case DRIVE_PERMISSIONS:
+                apiProxy = getClient().permissions();                
+                break;                    
+            case DRIVE_PROPERTIES:
+                apiProxy = getClient().properties();                
+                break;                
+// Still need to support these drive APIs
+//              case DRIVE_CHANNELS:
+//              apiProxy = getClient().channels();
+//              break;                
+//          case DRIVE_CHILDREN:
+//              apiProxy = getClient().children();
+//              break;                
+//              case DRIVE_PARENTS:
+//              apiProxy = getClient().parents();                
+//              break;                
+//            case DRIVE_REALTIME:
+//                apiProxy = getClient().realtime();                
+//                break;                    
+            case DRIVE_REPLIES:
+                apiProxy = getClient().replies();                
+                break;                    
+            case DRIVE_REVISIONS:
+                apiProxy = getClient().revisions();                
+                break;                    
             default:
                 throw new IllegalArgumentException("Invalid API name " + apiName);
         } 

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
index c20a9e5..8e6ca4a 100644
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
@@ -4,11 +4,7 @@
  */
 package org.apache.camel.component.google.drive;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -18,18 +14,15 @@ import org.apache.camel.component.google.drive.internal.DriveAboutApiMethod;
 
 /**
  * Test class for com.google.api.services.drive.Drive$About APIs.
- * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
- * The class source won't be generated again if the generator MOJO finds it under src/test/java.
  */
 public class DriveAboutIntegrationTest extends AbstractGoogleDriveTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(DriveAboutIntegrationTest.class);
     private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveAboutApiMethod.class).getName();
 
-    @Ignore
     @Test
     public void testGet() throws Exception {
-        final com.google.api.services.drive.Drive.About.Get result = requestBody("direct://GET",
null);
+        final com.google.api.services.drive.model.About result = requestBody("direct://GET",
null);
 
         assertNotNull("get result", result);
         LOG.debug("get: " + result);

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
index ffce4fe..4247134 100644
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
@@ -4,9 +4,6 @@
  */
 package org.apache.camel.component.google.drive;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -18,8 +15,6 @@ import org.apache.camel.component.google.drive.internal.DriveAppsApiMethod;
 
 /**
  * Test class for com.google.api.services.drive.Drive$Apps APIs.
- * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
- * The class source won't be generated again if the generator MOJO finds it under src/test/java.
  */
 public class DriveAppsIntegrationTest extends AbstractGoogleDriveTestSupport {
 
@@ -37,10 +32,10 @@ public class DriveAppsIntegrationTest extends AbstractGoogleDriveTestSupport
{
         LOG.debug("get: " + result);
     }
 
-    @Ignore
+    // TODO getting permission errors for this one
     @Test
     public void testList() throws Exception {
-        final com.google.api.services.drive.Drive.Apps.List result = requestBody("direct://LIST",
null);
+        final com.google.api.services.drive.model.App result = requestBody("direct://LIST",
null);
 
         assertNotNull("list result", result);
         LOG.debug("list: " + result);

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
index a6b3ea3..9573994 100644
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
@@ -18,8 +18,6 @@ import org.apache.camel.component.google.drive.internal.DriveChangesApiMethod;
 
 /**
  * Test class for com.google.api.services.drive.Drive$Changes APIs.
- * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
- * The class source won't be generated again if the generator MOJO finds it under src/test/java.
  */
 public class DriveChangesIntegrationTest extends AbstractGoogleDriveTestSupport {
 
@@ -37,10 +35,9 @@ public class DriveChangesIntegrationTest extends AbstractGoogleDriveTestSupport
         LOG.debug("get: " + result);
     }
 
-    @Ignore
     @Test
     public void testList() throws Exception {
-        final com.google.api.services.drive.Drive.Changes.List result = requestBody("direct://LIST",
null);
+        final com.google.api.services.drive.model.ChangeList result = requestBody("direct://LIST",
null);
 
         assertNotNull("list result", result);
         LOG.debug("list: " + result);

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java
deleted file mode 100644
index dcdbff7..0000000
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Camel Api Route test generated by camel-component-util-maven-plugin
- * Generated on: Thu Jul 03 16:04:18 NDT 2014
- */
-package org.apache.camel.component.google.drive;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
-import org.apache.camel.component.google.drive.internal.DriveChannelsApiMethod;
-
-/**
- * Test class for com.google.api.services.drive.Drive$Channels APIs.
- * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
- * The class source won't be generated again if the generator MOJO finds it under src/test/java.
- */
-public class DriveChannelsIntegrationTest extends AbstractGoogleDriveTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DriveChannelsIntegrationTest.class);
-    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveChannelsApiMethod.class).getName();
-
-    // TODO provide parameter values for stop
-    @Ignore
-    @Test
-    public void testStop() throws Exception {
-        // using com.google.api.services.drive.model.Channel message body for single parameter
"contentChannel"
-        final com.google.api.services.drive.Drive.Channels.Stop result = requestBody("direct://STOP",
null);
-
-        assertNotNull("stop result", result);
-        LOG.debug("stop: " + result);
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() {
-                // test route for stop
-                from("direct://STOP")
-                  .to("google-drive://" + PATH_PREFIX + "/stop?inBody=contentChannel");
-
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
deleted file mode 100644
index f2ac396..0000000
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Camel Api Route test generated by camel-component-util-maven-plugin
- * Generated on: Thu Jul 03 16:04:18 NDT 2014
- */
-package org.apache.camel.component.google.drive;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
-import org.apache.camel.component.google.drive.internal.DriveChildrenApiMethod;
-
-/**
- * Test class for com.google.api.services.drive.Drive$Children APIs.
- * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
- * The class source won't be generated again if the generator MOJO finds it under src/test/java.
- */
-public class DriveChildrenIntegrationTest extends AbstractGoogleDriveTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DriveChildrenIntegrationTest.class);
-    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveChildrenApiMethod.class).getName();
-
-    // TODO provide parameter values for delete
-    @Ignore
-    @Test
-    public void testDelete() throws Exception {
-        final Map<String, Object> headers = new HashMap<String, Object>();
-        // parameter type is String
-        headers.put("CamelGoogleDrive.folderId", null);
-        // parameter type is String
-        headers.put("CamelGoogleDrive.childId", null);
-
-        final com.google.api.services.drive.Drive.Children.Delete result = requestBodyAndHeaders("direct://DELETE",
null, headers);
-
-        assertNotNull("delete result", result);
-        LOG.debug("delete: " + result);
-    }
-
-    // TODO provide parameter values for get
-    @Ignore
-    @Test
-    public void testGet() throws Exception {
-        final Map<String, Object> headers = new HashMap<String, Object>();
-        // parameter type is String
-        headers.put("CamelGoogleDrive.folderId", null);
-        // parameter type is String
-        headers.put("CamelGoogleDrive.childId", null);
-
-        final com.google.api.services.drive.Drive.Children.Get result = requestBodyAndHeaders("direct://GET",
null, headers);
-
-        assertNotNull("get result", result);
-        LOG.debug("get: " + result);
-    }
-
-    // TODO provide parameter values for insert
-    @Ignore
-    @Test
-    public void testInsert() throws Exception {
-        final Map<String, Object> headers = new HashMap<String, Object>();
-        // parameter type is String
-        headers.put("CamelGoogleDrive.folderId", null);
-        // parameter type is com.google.api.services.drive.model.ChildReference
-        headers.put("CamelGoogleDrive.content", null);
-
-        final com.google.api.services.drive.Drive.Children.Insert result = requestBodyAndHeaders("direct://INSERT",
null, headers);
-
-        assertNotNull("insert result", result);
-        LOG.debug("insert: " + result);
-    }
-
-    // TODO provide parameter values for list
-    @Ignore
-    @Test
-    public void testList() throws Exception {
-        // using String message body for single parameter "folderId"
-        final com.google.api.services.drive.Drive.Children.List result = requestBody("direct://LIST",
null);
-
-        assertNotNull("list result", result);
-        LOG.debug("list: " + result);
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() {
-                // test route for delete
-                from("direct://DELETE")
-                  .to("google-drive://" + PATH_PREFIX + "/delete");
-
-                // test route for get
-                from("direct://GET")
-                  .to("google-drive://" + PATH_PREFIX + "/get");
-
-                // test route for insert
-                from("direct://INSERT")
-                  .to("google-drive://" + PATH_PREFIX + "/insert");
-
-                // test route for list
-                from("direct://LIST")
-                  .to("google-drive://" + PATH_PREFIX + "/list?inBody=folderId");
-
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
index b952a93..4cb3882 100644
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
@@ -12,10 +12,13 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
+import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
 import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
 import org.apache.camel.component.google.drive.internal.DriveCommentsApiMethod;
 
+import com.google.api.client.http.FileContent;
+import com.google.api.services.drive.model.File;
+
 /**
  * Test class for com.google.api.services.drive.Drive$Comments APIs.
  * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
@@ -25,7 +28,10 @@ public class DriveCommentsIntegrationTest extends AbstractGoogleDriveTestSupport
 
     private static final Logger LOG = LoggerFactory.getLogger(DriveCommentsIntegrationTest.class);
     private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveCommentsApiMethod.class).getName();
-
+    private static final String TEST_UPLOAD_FILE = "src/test/resources/log4j.properties";
+    private static final String TEST_UPLOAD_IMG = "src/test/resources/camel-box-small.png";
+    private static final java.io.File UPLOAD_FILE = new java.io.File(TEST_UPLOAD_FILE);
+    
     // TODO provide parameter values for delete
     @Ignore
     @Test
@@ -74,12 +80,28 @@ public class DriveCommentsIntegrationTest extends AbstractGoogleDriveTestSupport
         LOG.debug("insert: " + result);
     }
 
-    // TODO provide parameter values for list
-    @Ignore
+    private File uploadTestFile() {
+        File fileMetadata = new File();
+        fileMetadata.setTitle(UPLOAD_FILE.getName());
+        FileContent mediaContent = new FileContent(null, UPLOAD_FILE);
+        
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is com.google.api.services.drive.model.File
+        headers.put("CamelGoogleDrive.content", fileMetadata);
+        // parameter type is com.google.api.client.http.AbstractInputStreamContent
+        headers.put("CamelGoogleDrive.mediaContent", mediaContent);
+
+        File result = requestBodyAndHeaders("direct://INSERT_1", null, headers);
+        return result;
+    }
+    
     @Test
     public void testList() throws Exception {
+        File testFile = uploadTestFile();
+        String fileId = testFile.getId();
+        
         // using String message body for single parameter "fileId"
-        final com.google.api.services.drive.Drive.Comments.List result = requestBody("direct://LIST",
null);
+        final com.google.api.services.drive.model.CommentList result = requestBody("direct://LIST",
fileId);
 
         assertNotNull("list result", result);
         LOG.debug("list: " + result);
@@ -148,6 +170,10 @@ public class DriveCommentsIntegrationTest extends AbstractGoogleDriveTestSupport
                 // test route for update
                 from("direct://UPDATE")
                   .to("google-drive://" + PATH_PREFIX + "/update");
+                
+                // just used to upload file for test
+                from("direct://INSERT_1")
+                  .to("google-drive://" + GoogleDriveApiCollection.getCollection().getApiName(DriveFilesApiMethod.class).getName()
+ "/insert");
 
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
index 3c88d39..ddf62bf 100644
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
@@ -5,7 +5,6 @@
 package org.apache.camel.component.google.drive;
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.camel.builder.RouteBuilder;

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java
deleted file mode 100644
index 40b1f2a..0000000
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Camel Api Route test generated by camel-component-util-maven-plugin
- * Generated on: Thu Jul 03 16:04:18 NDT 2014
- */
-package org.apache.camel.component.google.drive;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
-import org.apache.camel.component.google.drive.internal.DriveParentsApiMethod;
-
-/**
- * Test class for com.google.api.services.drive.Drive$Parents APIs.
- * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
- * The class source won't be generated again if the generator MOJO finds it under src/test/java.
- */
-public class DriveParentsIntegrationTest extends AbstractGoogleDriveTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DriveParentsIntegrationTest.class);
-    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveParentsApiMethod.class).getName();
-
-    // TODO provide parameter values for delete
-    @Ignore
-    @Test
-    public void testDelete() throws Exception {
-        final Map<String, Object> headers = new HashMap<String, Object>();
-        // parameter type is String
-        headers.put("CamelGoogleDrive.fileId", null);
-        // parameter type is String
-        headers.put("CamelGoogleDrive.parentId", null);
-
-        final com.google.api.services.drive.Drive.Parents.Delete result = requestBodyAndHeaders("direct://DELETE",
null, headers);
-
-        assertNotNull("delete result", result);
-        LOG.debug("delete: " + result);
-    }
-
-    // TODO provide parameter values for get
-    @Ignore
-    @Test
-    public void testGet() throws Exception {
-        final Map<String, Object> headers = new HashMap<String, Object>();
-        // parameter type is String
-        headers.put("CamelGoogleDrive.fileId", null);
-        // parameter type is String
-        headers.put("CamelGoogleDrive.parentId", null);
-
-        final com.google.api.services.drive.Drive.Parents.Get result = requestBodyAndHeaders("direct://GET",
null, headers);
-
-        assertNotNull("get result", result);
-        LOG.debug("get: " + result);
-    }
-
-    // TODO provide parameter values for insert
-    @Ignore
-    @Test
-    public void testInsert() throws Exception {
-        final Map<String, Object> headers = new HashMap<String, Object>();
-        // parameter type is String
-        headers.put("CamelGoogleDrive.fileId", null);
-        // parameter type is com.google.api.services.drive.model.ParentReference
-        headers.put("CamelGoogleDrive.content", null);
-
-        final com.google.api.services.drive.Drive.Parents.Insert result = requestBodyAndHeaders("direct://INSERT",
null, headers);
-
-        assertNotNull("insert result", result);
-        LOG.debug("insert: " + result);
-    }
-
-    // TODO provide parameter values for list
-    @Ignore
-    @Test
-    public void testList() throws Exception {
-        // using String message body for single parameter "fileId"
-        final com.google.api.services.drive.Drive.Parents.List result = requestBody("direct://LIST",
null);
-
-        assertNotNull("list result", result);
-        LOG.debug("list: " + result);
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() {
-                // test route for delete
-                from("direct://DELETE")
-                  .to("google-drive://" + PATH_PREFIX + "/delete");
-
-                // test route for get
-                from("direct://GET")
-                  .to("google-drive://" + PATH_PREFIX + "/get");
-
-                // test route for insert
-                from("direct://INSERT")
-                  .to("google-drive://" + PATH_PREFIX + "/insert");
-
-                // test route for list
-                from("direct://LIST")
-                  .to("google-drive://" + PATH_PREFIX + "/list?inBody=fileId");
-
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/2243e251/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRealtimeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRealtimeIntegrationTest.java
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRealtimeIntegrationTest.java
deleted file mode 100644
index d991aad..0000000
--- a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRealtimeIntegrationTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Camel Api Route test generated by camel-component-util-maven-plugin
- * Generated on: Thu Jul 03 16:04:18 NDT 2014
- */
-package org.apache.camel.component.google.drive;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
-import org.apache.camel.component.google.drive.internal.DriveRealtimeApiMethod;
-
-/**
- * Test class for com.google.api.services.drive.Drive$Realtime APIs.
- * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
- * The class source won't be generated again if the generator MOJO finds it under src/test/java.
- */
-public class DriveRealtimeIntegrationTest extends AbstractGoogleDriveTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(DriveRealtimeIntegrationTest.class);
-    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveRealtimeApiMethod.class).getName();
-
-    // TODO provide parameter values for get
-    @Ignore
-    @Test
-    public void testGet() throws Exception {
-        // using String message body for single parameter "fileId"
-        final com.google.api.services.drive.Drive.Realtime.Get result = requestBody("direct://GET",
null);
-
-        assertNotNull("get result", result);
-        LOG.debug("get: " + result);
-    }
-
-    // TODO provide parameter values for update
-    @Ignore
-    @Test
-    public void testUpdate() throws Exception {
-        // using String message body for single parameter "fileId"
-        final com.google.api.services.drive.Drive.Realtime.Update result = requestBody("direct://UPDATE",
null);
-
-        assertNotNull("update result", result);
-        LOG.debug("update: " + result);
-    }
-
-    // TODO provide parameter values for update
-    @Ignore
-    @Test
-    public void testUpdate_1() throws Exception {
-        final Map<String, Object> headers = new HashMap<String, Object>();
-        // parameter type is String
-        headers.put("CamelGoogleDrive.fileId", null);
-        // parameter type is com.google.api.client.http.AbstractInputStreamContent
-        headers.put("CamelGoogleDrive.mediaContent", null);
-
-        final com.google.api.services.drive.Drive.Realtime.Update result = requestBodyAndHeaders("direct://UPDATE_1",
null, headers);
-
-        assertNotNull("update result", result);
-        LOG.debug("update: " + result);
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() {
-                // test route for get
-                from("direct://GET")
-                  .to("google-drive://" + PATH_PREFIX + "/get?inBody=fileId");
-
-                // test route for update
-                from("direct://UPDATE")
-                  .to("google-drive://" + PATH_PREFIX + "/update?inBody=fileId");
-
-                // test route for update
-                from("direct://UPDATE_1")
-                  .to("google-drive://" + PATH_PREFIX + "/update");
-
-            }
-        };
-    }
-}


Mime
View raw message