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/03/14 07:58:48 UTC

camel git commit: CAMEL-10966 Salesforce Maven Plugin doesn't esc...

Repository: camel
Updated Branches:
  refs/heads/master 3ce4ad86e -> 885785144


CAMEL-10966 Salesforce Maven Plugin doesn't esc...

...ape strings when doing the camel-salesforce:generate phase

When to files differ make the test show expected and generated file
differences.


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

Branch: refs/heads/master
Commit: 885785144bfa5e905d11eaf006ac971bdfcb480f
Parents: 3ce4ad8
Author: Zoran Regvart <zr...@apache.org>
Authored: Tue Mar 14 08:58:37 2017 +0100
Committer: Zoran Regvart <zr...@apache.org>
Committed: Tue Mar 14 08:58:37 2017 +0100

----------------------------------------------------------------------
 .../camel/maven/CamelSalesforceMojoOutputTest.java       | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/88578514/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
index 4ddf2d2..d7430a9 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
@@ -26,6 +26,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Rule;
@@ -84,10 +85,14 @@ public class CamelSalesforceMojoOutputTest {
         mojo.processDescription(pkgDir, description, utility, FIXED_DATE);
 
         File generatedFile = new File(pkgDir, source);
-        File expectedFile = FileUtils.toFile(CamelSalesforceMojoOutputTest.class.getResource("/generated/" + source));
+        String generatedContent = FileUtils.readFileToString(generatedFile);
 
-        Assert.assertTrue("Geberated source file in " + source + " must be equal to the one present in test/resources",
-            FileUtils.contentEquals(generatedFile, expectedFile));
+        String expectedContent = IOUtils
+            .toString(CamelSalesforceMojoOutputTest.class.getResource("/generated/" + source));
+
+        Assert.assertEquals(
+            "Geberated source file in " + source + " must be equal to the one present in test/resources",
+            generatedContent, expectedContent);
     }
 
     static SObjectDescription createSObjectDescription(String name) throws IOException {