Update code for xml-2
This commit is contained in:
+2
-1
@@ -7,6 +7,7 @@ import static org.junit.Assert.assertNotNull;
|
|||||||
import static org.junit.Assert.assertThat;
|
import static org.junit.Assert.assertThat;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.net.URI;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -103,7 +104,7 @@ public class JavaReadWriteJsonExampleUnitTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void wheReadFromUrl_thanCorrect() throws Exception {
|
public void wheReadFromUrl_thanCorrect() throws Exception {
|
||||||
URL resource = new URL("file:src/test/resources/json_car.json");
|
URL resource = new URI("file:src/test/resources/json_car.json").toURL();
|
||||||
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
Car fromFile = objectMapper.readValue(resource, Car.class);
|
Car fromFile = objectMapper.readValue(resource, Car.class);
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
<module>testing-modules</module>
|
<module>testing-modules</module>
|
||||||
<module>toolkits</module>
|
<module>toolkits</module>
|
||||||
<module>xml</module>
|
<module>xml</module>
|
||||||
|
<module>xml-2</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
+2
-2
@@ -8,9 +8,9 @@
|
|||||||
<name>xml-2</name>
|
<name>xml-2</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.ossez</groupId>
|
||||||
<artifactId>parent-modules</artifactId>
|
<artifactId>parent-modules</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>0.0.2-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
Reference in New Issue
Block a user