Update code for xml-2
This commit is contained in:
parent
b13d0c4d9c
commit
bcbd0bbd49
@ -7,6 +7,7 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -103,7 +104,7 @@ public class JavaReadWriteJsonExampleUnitTest {
|
||||
|
||||
@Test
|
||||
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();
|
||||
Car fromFile = objectMapper.readValue(resource, Car.class);
|
||||
|
1
pom.xml
1
pom.xml
@ -55,6 +55,7 @@
|
||||
<module>testing-modules</module>
|
||||
<module>toolkits</module>
|
||||
<module>xml</module>
|
||||
<module>xml-2</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
@ -8,9 +8,9 @@
|
||||
<name>xml-2</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<groupId>com.ossez</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
Loading…
x
Reference in New Issue
Block a user