You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/06/01 08:38:28 UTC

[camel] branch main updated (f6e75a815a4 -> 1d264033e24)

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

orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from f6e75a815a4 (chores) camel-aws2-kinesis: convert manual IT to automated integration test
     new c08b3bc5c5b (chores) camel-cxf: fixed incorrect assertion order
     new 1d264033e24 (chores) camel-huaweicloud-frs: fixed incorrect assertion order

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/component/cxf/mtom/CxfJavaMtomProducerPayloadTest.java  | 4 ++--
 .../org/apache/camel/component/cxf/mtom/CxfMtomConsumerTest.java  | 4 ++--
 .../frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java | 8 ++++----
 .../frs/mock/FaceVerificationWithImageFileAndMockClientTest.java  | 6 +++---
 .../frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java   | 6 +++---
 .../frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java    | 4 ++--
 .../frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java     | 4 ++--
 .../frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java      | 4 ++--
 8 files changed, 20 insertions(+), 20 deletions(-)


[camel] 02/02: (chores) camel-huaweicloud-frs: fixed incorrect assertion order

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1d264033e24c6caddc9e4821813cfedb849f5028
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Jun 1 09:34:40 2022 +0200

    (chores) camel-huaweicloud-frs: fixed incorrect assertion order
---
 .../frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java | 8 ++++----
 .../frs/mock/FaceVerificationWithImageFileAndMockClientTest.java  | 6 +++---
 .../frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java   | 6 +++---
 .../frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java    | 4 ++--
 .../frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java     | 4 ++--
 .../frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java      | 4 ++--
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
index bca77b570e9..38156b929a9 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
@@ -87,7 +87,7 @@ public class FaceVerificationWithImageBae64AndMockClientTest extends CamelTestSu
         CompareFaceByBase64Response response = (CompareFaceByBase64Response) responseExchange.getIn().getBody();
         assertEquals(response.getImage1Face(), MockResult.getCompareFaceResult());
         assertEquals(response.getImage2Face(), MockResult.getCompareFaceResult());
-        assertEquals(response.getSimilarity(), 1.0);
+        assertEquals(1.0, response.getSimilarity());
     }
 
     /**
@@ -105,9 +105,9 @@ public class FaceVerificationWithImageBae64AndMockClientTest extends CamelTestSu
 
         assertTrue(responseExchange.getIn().getBody() instanceof CompareFaceByBase64Response);
         CompareFaceByBase64Response response = (CompareFaceByBase64Response) responseExchange.getIn().getBody();
-        assertEquals(response.getImage1Face(), MockResult.getCompareFaceResult());
-        assertEquals(response.getImage2Face(), MockResult.getCompareFaceResult());
-        assertEquals(response.getSimilarity(), 1.0);
+        assertEquals(MockResult.getCompareFaceResult(), response.getImage1Face());
+        assertEquals(MockResult.getCompareFaceResult(), response.getImage2Face());
+        assertEquals(1.0, response.getSimilarity());
     }
 
 }
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageFileAndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageFileAndMockClientTest.java
index 1b7026e594a..e1243dada84 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageFileAndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageFileAndMockClientTest.java
@@ -71,9 +71,9 @@ public class FaceVerificationWithImageFileAndMockClientTest extends CamelTestSup
 
         assertTrue(responseExchange.getIn().getBody() instanceof CompareFaceByFileResponse);
         CompareFaceByFileResponse response = (CompareFaceByFileResponse) responseExchange.getIn().getBody();
-        assertEquals(response.getImage1Face(), MockResult.getCompareFaceResult());
-        assertEquals(response.getImage2Face(), MockResult.getCompareFaceResult());
-        assertEquals(response.getSimilarity(), 1.0);
+        assertEquals(MockResult.getCompareFaceResult(), response.getImage1Face());
+        assertEquals(MockResult.getCompareFaceResult(), response.getImage2Face());
+        assertEquals(1.0, response.getSimilarity());
     }
 
 }
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java
index 67657eea4ce..eaba3b9d1ee 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java
@@ -71,9 +71,9 @@ public class FaceVerificationWithImageUrlAndMockClientTest extends CamelTestSupp
 
         assertTrue(responseExchange.getIn().getBody() instanceof CompareFaceByUrlResponse);
         CompareFaceByUrlResponse response = (CompareFaceByUrlResponse) responseExchange.getIn().getBody();
-        assertEquals(response.getImage1Face(), MockResult.getCompareFaceResult());
-        assertEquals(response.getImage2Face(), MockResult.getCompareFaceResult());
-        assertEquals(response.getSimilarity(), 1.0);
+        assertEquals(MockResult.getCompareFaceResult(), response.getImage1Face());
+        assertEquals(MockResult.getCompareFaceResult(), response.getImage2Face());
+        assertEquals(1.0, response.getSimilarity());
     }
 
 }
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java
index 5b94066c410..487e65e8cb1 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java
@@ -71,8 +71,8 @@ public class LiveDetectionWithVideoBae64AndMockClientTest extends CamelTestSuppo
 
         assertTrue(responseExchange.getIn().getBody() instanceof DetectLiveByBase64Response);
         DetectLiveByBase64Response response = (DetectLiveByBase64Response) responseExchange.getIn().getBody();
-        assertEquals(response.getVideoResult(), MockResult.getLiveDetectResult());
-        assertEquals(response.getWarningList().size(), 0);
+        assertEquals(MockResult.getLiveDetectResult(), response.getVideoResult());
+        assertEquals(0, response.getWarningList().size());
     }
 
 }
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java
index 27cf3f57a79..08ba8dd7fb1 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java
@@ -71,7 +71,7 @@ public class LiveDetectionWithVideoFileAndMockClientTest extends CamelTestSuppor
 
         assertTrue(responseExchange.getIn().getBody() instanceof DetectLiveByFileResponse);
         DetectLiveByFileResponse response = (DetectLiveByFileResponse) responseExchange.getIn().getBody();
-        assertEquals(response.getVideoResult(), MockResult.getLiveDetectResult());
-        assertEquals(response.getWarningList().size(), 0);
+        assertEquals(MockResult.getLiveDetectResult(), response.getVideoResult());
+        assertEquals(0, response.getWarningList().size());
     }
 }
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java
index 9259691fa51..5bb1d414415 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java
@@ -71,8 +71,8 @@ public class LiveDetectionWithVideoUrlAndMockClientTest extends CamelTestSupport
 
         assertTrue(responseExchange.getIn().getBody() instanceof DetectLiveByUrlResponse);
         DetectLiveByUrlResponse response = (DetectLiveByUrlResponse) responseExchange.getIn().getBody();
-        assertEquals(response.getVideoResult(), MockResult.getLiveDetectResult());
-        assertEquals(response.getWarningList().size(), 0);
+        assertEquals(MockResult.getLiveDetectResult(), response.getVideoResult());
+        assertEquals(0, response.getWarningList().size());
     }
 
 }


[camel] 01/02: (chores) camel-cxf: fixed incorrect assertion order

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c08b3bc5c5b7a1dba388bdc5ca8417673e242229
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Jun 1 09:33:33 2022 +0200

    (chores) camel-cxf: fixed incorrect assertion order
---
 .../camel/component/cxf/mtom/CxfJavaMtomProducerPayloadTest.java      | 4 ++--
 .../java/org/apache/camel/component/cxf/mtom/CxfMtomConsumerTest.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfJavaMtomProducerPayloadTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfJavaMtomProducerPayloadTest.java
index 05d17089ab9..e575ef4eb55 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfJavaMtomProducerPayloadTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfJavaMtomProducerPayloadTest.java
@@ -65,8 +65,8 @@ public class CxfJavaMtomProducerPayloadTest extends CxfMtomConsumerTest {
         // Get the operation name
         final Holder<byte[]> responsePhoto = (Holder<byte[]>) parameter.get(1);
         assertNotNull(responsePhoto.value, "The photo should not be null");
-        assertEquals(new String(responsePhoto.value, "UTF-8"),
-                "ResponseFromCamel", "Should get the right response");
+        assertEquals("ResponseFromCamel",
+                new String(responsePhoto.value, "UTF-8"), "Should get the right response");
 
         final Holder<Image> responseImage = (Holder<Image>) parameter.get(2);
         assertNotNull(responseImage.value, "We should get the image here");
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomConsumerTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomConsumerTest.java
index 4e86b1551ab..7459a056ef4 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomConsumerTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomConsumerTest.java
@@ -72,8 +72,8 @@ public class CxfMtomConsumerTest extends CamelTestSupport {
                         // Get the operation name
                         Holder<byte[]> photo = (Holder<byte[]>) parameter.get(0);
                         assertNotNull(photo.value, "The photo should not be null");
-                        assertEquals(new String(photo.value, "UTF-8"),
-                                "RequestFromCXF", "Should get the right request");
+                        assertEquals("RequestFromCXF",
+                                new String(photo.value, "UTF-8"), "Should get the right request");
                         photo.value = "ResponseFromCamel".getBytes("UTF-8");
                         Holder<Image> image = (Holder<Image>) parameter.get(1);
                         assertNotNull(image.value, "We should get the image here");