You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2017/08/14 09:53:26 UTC

camel git commit: Fixes Checkstyle issues in Salesforce component

Repository: camel
Updated Branches:
  refs/heads/master 05b746c3d -> f4fca5296


Fixes Checkstyle issues in Salesforce component


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

Branch: refs/heads/master
Commit: f4fca529679b5b105d9a5e382a1651f6859ceddf
Parents: 05b746c
Author: Zoran Regvart <zr...@apache.org>
Authored: Mon Aug 14 11:52:43 2017 +0200
Committer: Zoran Regvart <zr...@apache.org>
Committed: Mon Aug 14 11:53:12 2017 +0200

----------------------------------------------------------------------
 .../component/salesforce/RawPayloadTest.java    | 31 ++++++++++----------
 .../salesforce/api/utils/JsonUtilsTest.java     | 24 ++++++++++++---
 .../CamelSalesforceMojoIntegrationTest.java     |  8 ++---
 3 files changed, 40 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f4fca529/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java
index 7d6941c..04b5fb3 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java
@@ -23,6 +23,12 @@ import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import okhttp3.HttpUrl;
+import okhttp3.mockwebserver.Dispatcher;
+import okhttp3.mockwebserver.MockResponse;
+import okhttp3.mockwebserver.MockWebServer;
+import okhttp3.mockwebserver.RecordedRequest;
+
 import org.apache.camel.builder.RouteBuilder;
 import org.eclipse.jetty.http.HttpHeader;
 import org.junit.AfterClass;
@@ -35,16 +41,16 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
 import org.junit.runners.Parameterized.Parameters;
 
-import okhttp3.HttpUrl;
-import okhttp3.mockwebserver.Dispatcher;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import okhttp3.mockwebserver.RecordedRequest;
-
 @Category(Standalone.class)
 @RunWith(Parameterized.class)
 public class RawPayloadTest extends AbstractSalesforceTestBase {
 
+    @Parameter
+    public static String format;
+
+    @Parameter(1)
+    public static String endpointUri;
+
     private static final String OAUTH2_TOKEN_PATH = "/services/oauth2/token";
     private static final String XML_RESPONSE = "<response/>";
     private static final String JSON_RESPONSE = "{ \"response\" : \"mock\" }";
@@ -52,11 +58,6 @@ public class RawPayloadTest extends AbstractSalesforceTestBase {
     private static HttpUrl loginUrl;
     private static MockWebServer server;
 
-    @Parameter
-    public static String format;
-
-    @Parameter(1)
-    public static String endpointUri;
 
     private static String lastFormat;
     private static String expectedResponse;
@@ -227,10 +228,10 @@ public class RawPayloadTest extends AbstractSalesforceTestBase {
     @Parameters(name = "format = {0}, endpoint = {1}")
     public static List<String[]> parameters() {
         final String[] endpoints = {"direct:getVersions", "direct:getResources", "direct:getGlobalObjects",
-                "direct:getBasicInfo", "direct:getDescription", "direct:getSObject", "direct:createSObject", 
-                "direct:updateSObject", "direct:deleteSObject", "direct:getSObjectWithId", "direct:upsertSObject", 
-                "direct:deleteSObjectWithId", "direct:getBlobField", "direct:query", "direct:queryAll", 
-                "direct:search", "direct:apexCallGet", "direct:apexCallGetWithId", "direct:apexCallPatch"};
+            "direct:getBasicInfo", "direct:getDescription", "direct:getSObject", "direct:createSObject", 
+            "direct:updateSObject", "direct:deleteSObject", "direct:getSObjectWithId", "direct:upsertSObject", 
+            "direct:deleteSObjectWithId", "direct:getBlobField", "direct:query", "direct:queryAll", 
+            "direct:search", "direct:apexCallGet", "direct:apexCallGetWithId", "direct:apexCallPatch"};
 
         final String[] formats = {"XML", "JSON"};
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f4fca529/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java
index cd59a9e..c7d46ce 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java
@@ -1,15 +1,31 @@
+/**
+ * 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.salesforce.api.utils;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
+import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema;
+
 import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
 import org.apache.camel.component.salesforce.dto.generated.Account;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
-import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;

http://git-wip-us.apache.org/repos/asf/camel/blob/f4fca529/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java
index 2f75608..4d47e2f 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java
@@ -23,6 +23,10 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
+import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema;
+
 import org.apache.camel.component.salesforce.SalesforceEndpointConfig;
 import org.apache.camel.component.salesforce.SalesforceLoginConfig;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
@@ -30,10 +34,6 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
 import org.junit.Assert;
 import org.junit.Test;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
-import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema;
-
 public class CamelSalesforceMojoIntegrationTest {
 
     private static final String TEST_LOGIN_PROPERTIES = "../test-salesforce-login.properties";