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

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

commit 4ecc198c96b325cc439269047934cc21e9c730d8
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Jan 13 10:30:38 2023 +0100

    Camel-Jsonb: Fixed tests and remove some of them, since Yasson treat this 
stuff in a different way
    
    Signed-off-by: Andrea Cosentino <anco...@gmail.com>
---
 .../camel/component/jsonb/JsonbAttributeOrderTest.java     |  2 +-
 .../apache/camel/component/jsonb/JsonbDataFormatTest.java  | 14 +-------------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git 
a/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbAttributeOrderTest.java
 
b/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbAttributeOrderTest.java
index 2a97b158aa5..c8d5b316119 100644
--- 
a/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbAttributeOrderTest.java
+++ 
b/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbAttributeOrderTest.java
@@ -30,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class JsonbAttributeOrderTest extends CamelTestSupport {
 
     final String expectedJson
-            = 
"{\"bg\":\"123.123\",\"bool\":true,\"doubleNumber\":123.123,\"floatNumber\":123.0,\"intNumber\":123,\"longNumber\":123}";
+            = 
"{\"bg\":123.123,\"bool\":true,\"doubleNumber\":123.123,\"floatNumber\":123.0,\"intNumber\":123,\"longNumber\":123}";
 
     @Test
     public void testMarshalAndUnmarshalMap() throws Exception {
diff --git 
a/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbDataFormatTest.java
 
b/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbDataFormatTest.java
index b9c5c5532ec..d47b948797b 100644
--- 
a/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbDataFormatTest.java
+++ 
b/components/camel-jsonb/src/test/java/org/apache/camel/component/jsonb/JsonbDataFormatTest.java
@@ -49,18 +49,6 @@ public class JsonbDataFormatTest {
                 new 
ArrayList<>(Collections.singletonList(Collections.singletonMap("value", 123))), 
null, type);
     }
 
-    @Test
-    public void testArray() throws Exception {
-        testJson("{\"value\":123}", new ArrayList<String>(), ArrayList.class, 
null);
-    }
-
-    @Test
-    public void testSkipEmptyArray() throws Exception {
-        JohnzonParameterizedType type = new 
JohnzonParameterizedType(ArrayList.class, ArrayList.class);
-        testJson("[{\"value\":123}]",
-                new 
ArrayList<>(Collections.singletonList(Collections.emptyList())), null, type);
-    }
-
     private void testJson(String json, Object expected, Class<?> 
unmarshalType, JohnzonParameterizedType customType)
             throws Exception {
         Object unmarshalled;
@@ -76,7 +64,7 @@ public class JsonbDataFormatTest {
             try (InputStream in = new ByteArrayInputStream(json.getBytes())) {
                 unmarshalled = jsonbDataFormat.unmarshal(new 
DefaultExchange(new DefaultCamelContext()), in);
             }
-            assertEquals(expected, unmarshalled);
+            assertEquals(expected.toString(), unmarshalled.toString());
         } finally {
             if (jsonbDataFormat != null) {
                 jsonbDataFormat.close();

Reply via email to