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 2021/11/25 08:47:44 UTC

[camel] branch main updated: (chores) camel-swagger-java: simplified assertions and fixed missing predicates

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


The following commit(s) were added to refs/heads/main by this push:
     new b6ef348  (chores) camel-swagger-java: simplified assertions and fixed missing predicates
b6ef348 is described below

commit b6ef348bcf858541e5228570212ecb18483e8629
Author: Otavio Rodolfo Piske <op...@redhat.com>
AuthorDate: Thu Nov 25 08:35:09 2021 +0100

    (chores) camel-swagger-java: simplified assertions and fixed missing predicates
---
 .../src/test/java/org/apache/camel/swagger/ParameterAssert.java       | 3 ++-
 .../test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java  | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/ParameterAssert.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/ParameterAssert.java
index ed5c9f5..ee17ddd 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/ParameterAssert.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/ParameterAssert.java
@@ -57,7 +57,8 @@ public final class ParameterAssert extends ObjectAssert<Parameter> {
 
     public ParameterAssert hasName(final String name) {
         final String actualName = actual.getName();
-        Assertions.assertThat(actualName).as("Parameter name should equal %s, but it's %s", name, actualName);
+        Assertions.assertThat(actualName).as("Parameter name should equal %s, but it's %s", name, actualName)
+                .isEqualTo(name);
 
         return this;
     }
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java
index b761db0..15fc2fc 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java
@@ -80,10 +80,10 @@ public class RestSwaggerArrayEnumTest {
         ParameterAssert.assertThat(parameters.get(3)).hasName("pathArrayParam").isGivenIn("path").isOfType("array")
                 .isOfArrayType("string").hasArrayEnumSpecifiedWith("a", "b", "c");
 
-        ParameterAssert.assertThat(parameters.get(4)).hasName("queryParam").isGivenIn("query").isOfType("array")
+        ParameterAssert.assertThat(parameters.get(4)).hasName("queryArrayParam").isGivenIn("query").isOfType("array")
                 .isOfArrayType("int").hasArrayEnumSpecifiedWith(1, 2, 3);
 
-        ParameterAssert.assertThat(parameters.get(5)).hasName("headerParam").isGivenIn("header").isOfType("array")
+        ParameterAssert.assertThat(parameters.get(5)).hasName("headerArrayParam").isGivenIn("header").isOfType("array")
                 .isOfArrayType("float").hasArrayEnumSpecifiedWith(1.1f, 2.2f, 3.3f);
     }