Improved test
This commit is contained in:
parent
3f29a00f05
commit
587c0971ad
|
@ -1,7 +1,6 @@
|
|||
package org.gcube.data_catalogue.grsf_publish_ws;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import org.gcube.data_catalogue.grsf_publish_ws.json.input.record.StockRecord;
|
||||
|
@ -9,7 +8,6 @@ import org.junit.Test;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
|
@ -31,7 +29,8 @@ public class TestJson {
|
|||
public void testJsonDeserialization() throws Exception {
|
||||
File jsonQueryFile = new File(getResourcesDirectory(), "70ae6895-7d3d-4f4a-86f9-bcb17d41bff6.json");
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
// JsonNode jsonNode = objectMapper.readTree(jsonQueryFile);
|
||||
JsonNode jsonNode = objectMapper.readTree(jsonQueryFile);
|
||||
logger.debug("{}", jsonNode);
|
||||
StockRecord sr = objectMapper.readValue(jsonQueryFile, StockRecord.class);
|
||||
logger.debug("{}", sr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue