diff --git a/Test Results - Tests_in_'json-path-parent_json-path'.html b/Test Results - Tests_in_'json-path-parent_json-path'.html new file mode 100644 index 00000000..150a8221 --- /dev/null +++ b/Test Results - Tests_in_'json-path-parent_json-path'.html @@ -0,0 +1,5817 @@ + + + + + Test Results — Tests in 'json-path-parent.json-path' + + + + + + + + + +
+ +
+ +
+
+ + + diff --git a/Test Results - Tests_in_'json-path-parent_json-path-assert'.html b/Test Results - Tests_in_'json-path-parent_json-path-assert'.html new file mode 100644 index 00000000..48e421c7 --- /dev/null +++ b/Test Results - Tests_in_'json-path-parent_json-path-assert'.html @@ -0,0 +1,1144 @@ + + + + + Test Results — Tests in 'json-path-parent.json-path-assert' + + + + + + + + + +
+ +
+ +
+
+ + + diff --git a/json-path/src/test/java/com/jayway/jsonpath/internal/JettisonProviderTest.java b/json-path/src/test/java/com/jayway/jsonpath/internal/JettisonProviderTest.java new file mode 100644 index 00000000..266877cc --- /dev/null +++ b/json-path/src/test/java/com/jayway/jsonpath/internal/JettisonProviderTest.java @@ -0,0 +1,34 @@ +//package com.jayway.jsonpath.internal; +// +//import com.jayway.jsonpath.spi.json.JettisonProvider; +//import org.junit.Before; +//import org.junit.Test; +// +//import static org.junit.Assert.assertEquals; +//import static org.junit.Assert.assertTrue; +// +//public class JettisonProviderTest { +// +// private JettisonProvider jsonProvider; +// +// @Before +// public void setUp() { +// jsonProvider = new JettisonProvider(); +// } +// +// @Test +// public void parseValidJsonString() { +// //Input json +// String jsonString = "{\"name\":\"Vishesh\",\"age\":21}"; +// +// // When parsing a valid JSON string +// Object result = jsonProvider.parse(jsonString); +// +// assertTrue(jsonProvider.isMap(result)); +// +// // expected values +// assertEquals("Vishesh", jsonProvider.getMapValue(result, "name")); +// assertEquals(21, jsonProvider.getMapValue(result, "age")); +// } +// +//} diff --git a/json-path/src/test/java/com/jayway/jsonpath/internal/JsonOrgJsonProviderTest.java b/json-path/src/test/java/com/jayway/jsonpath/internal/JsonOrgJsonProviderTest.java new file mode 100644 index 00000000..d6558328 --- /dev/null +++ b/json-path/src/test/java/com/jayway/jsonpath/internal/JsonOrgJsonProviderTest.java @@ -0,0 +1,46 @@ +//package com.jayway.jsonpath.internal; +// +//import com.jayway.jsonpath.spi.json.JsonOrgJsonProvider; +//import org.junit.Before; +//import org.junit.Test; +// +//import java.io.ByteArrayInputStream; +//import java.io.InputStream; +//import java.nio.charset.StandardCharsets; +// +//import static org.junit.Assert.assertEquals; +//import static org.junit.Assert.assertTrue; +// +//public class JsonOrgJsonProviderTest { +// private JsonOrgJsonProvider jsonProvider; +// @Before +// public void setUp() { +// jsonProvider = new JsonOrgJsonProvider(); +// } +// @Test +// public void parseValidJsonString() { +// //input json +// String jsonString = "{\"name\":\"Raj\",\"age\":31}"; +// +// // When parsing a valid JSON string +// Object result = jsonProvider.parse(jsonString); +// +// assertTrue(jsonProvider.isMap(result)); +// assertEquals("Raj", jsonProvider.getMapValue(result, "name")); +// assertEquals(31, jsonProvider.getMapValue(result, "age")); +// } +// @Test +// public void parseValidJsonInputStream() { +// +// String jsonString = "{\"name\":\"Raj\",\"age\":31}"; +// InputStream jsonStream = new ByteArrayInputStream(jsonString.getBytes(StandardCharsets.UTF_8)); +// +// // When parsing valid JSON from an InputStream +// Object result = jsonProvider.parse(jsonStream, StandardCharsets.UTF_8.name()); +// +// assertTrue(jsonProvider.isMap(result)); +// // expected values +// assertEquals("Raj", jsonProvider.getMapValue(result, "name")); +// assertEquals(31, jsonProvider.getMapValue(result, "age")); +// } +//} diff --git a/json-path/src/test/java/com/jayway/jsonpath/internal/TapestryMappingProviderTest.java b/json-path/src/test/java/com/jayway/jsonpath/internal/TapestryMappingProviderTest.java new file mode 100644 index 00000000..725b5577 --- /dev/null +++ b/json-path/src/test/java/com/jayway/jsonpath/internal/TapestryMappingProviderTest.java @@ -0,0 +1,42 @@ +//package com.jayway.jsonpath.internal; +// +//import com.jayway.jsonpath.Configuration; +//import com.jayway.jsonpath.TypeRef; +//import com.jayway.jsonpath.spi.mapper.TapestryMappingProvider; +//import org.junit.Before; +//import org.junit.Test; +// +//import java.util.List; +// +//import static org.junit.Assert.assertNull; +//import static org.junit.Assert.fail; +// +//public class TapestryMappingProviderTest { +// private TapestryMappingProvider mappingProvider; +// private Configuration configuration; +// @Before +// public void setUp() { +// mappingProvider = new TapestryMappingProvider(); +// configuration = Configuration.defaultConfiguration(); +// } +// @Test +// public void mapNullSourceToNullTarget() { +// Object source = null; +// +// Object result = mappingProvider.map(source, List.class, configuration); +// +// //result should be null +// assertNull(result); +// } +// @Test +// public void mapArrayToJsonRef() { +// String[] source = new String[]{"Red", "Green", "Blue"}; +// +// try { +// Object result = mappingProvider.map(source, new TypeRef>() {}, configuration); +// fail("Expected UnsupportedOperationException"); +// } catch (UnsupportedOperationException e) { +// // UnsupportedOperationException should be thrown +// } +// } +//}