camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lburgazz...@apache.org
Subject [5/6] camel git commit: Fix test cases
Date Thu, 30 Mar 2017 16:05:53 GMT
Fix test cases


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

Branch: refs/heads/master
Commit: c0e7e607a5594b80be0e7ae6446ca2d392627c80
Parents: 891dc97
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Thu Mar 30 18:05:10 2017 +0200
Committer: lburgazzoli <lburgazzoli@gmail.com>
Committed: Thu Mar 30 18:05:10 2017 +0200

----------------------------------------------------------------------
 .../component/salesforce/SalesforceComponentVerifierTest.java    | 4 ++--
 .../component/servicenow/ServiceNowComponentVerifierTest.java    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c0e7e607/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierTest.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierTest.java
index af8b6cd..dc02d55 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierTest.java
@@ -154,7 +154,7 @@ public class SalesforceComponentVerifierTest extends CamelTestSupport
{
         Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(VerificationError.HttpAttribute.HTTP_CODE));
 
         // Salesforce Error
-        Assert.assertEquals("authentication failure", result.getErrors().get(1).getDescription());
+        Assert.assertEquals("invalid_grant", result.getErrors().get(1).getDetail("salesforce_code"));
     }
 
     @Test
@@ -177,6 +177,6 @@ public class SalesforceComponentVerifierTest extends CamelTestSupport
{
         Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifier.VerificationError.HttpAttribute.HTTP_CODE));
 
         // Salesforce Error
-        Assert.assertEquals("client identifier invalid", result.getErrors().get(1).getDescription());
+        Assert.assertEquals("invalid_client_id", result.getErrors().get(1).getDetail("salesforce_code"));
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/c0e7e607/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
index 80da7db..1fcd5bc 100644
--- a/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
+++ b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
@@ -125,7 +125,7 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport
{
         Assert.assertEquals(1, result.getErrors().size());
         Assert.assertEquals(VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
         Assert.assertNotNull(result.getErrors().get(0).getDetails().get(VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(VerificationError.HttpAttribute.HTTP_CODE));
         Assert.assertTrue(result.getErrors().get(0).getDetails().get(VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE)
instanceof ServiceNowException);
     }
 
@@ -140,7 +140,7 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport
{
 
         Assert.assertEquals(ComponentVerifier.Result.Status.ERROR, result.getStatus());
         Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
+        Assert.assertEquals(VerificationError.StandardCode.AUTHENTICATION, result.getErrors().get(0).getCode());
         Assert.assertNotNull(result.getErrors().get(0).getDetails().get(VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
         Assert.assertEquals(401, result.getErrors().get(0).getDetails().get(VerificationError.HttpAttribute.HTTP_CODE));
         Assert.assertTrue(result.getErrors().get(0).getDetails().get(VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE)
instanceof ServiceNowException);


Mime
View raw message