Fixed test units
This commit is contained in:
parent
c93ed248a9
commit
a4d27b743e
|
@ -1,5 +1,6 @@
|
|||
package org.gcube.application.cms.commons.model.concessioni;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.gcube.application.cms.tests.model.TestModel;
|
||||
|
@ -34,8 +35,8 @@ public class SerializationTest {
|
|||
@Test
|
||||
public void readProfile() throws JsonProcessingException, IOException {
|
||||
|
||||
Profile concessione=mapper.readerFor(Profile.class).readValue(
|
||||
Files.getFileFromResources("test-data/concessioni/ProfileConcessioni.json"));
|
||||
Profile concessione=mapper.readerFor(Profile.class).readValue(new File(TestModel.getBaseFolder(),"ProfileConcessioni.json"));
|
||||
|
||||
System.out.println("Profile is "+mapper.writeValueAsString(concessione));
|
||||
|
||||
Assert.assertTrue(concessione.getFields().size()>0);
|
||||
|
@ -44,8 +45,7 @@ public class SerializationTest {
|
|||
|
||||
@Test
|
||||
public void readConcessione() throws JsonProcessingException, IOException {
|
||||
Concessione concessione=mapper.readerFor(Concessione.class).readValue(
|
||||
Files.getFileFromResources("test-data/concessioni/Concessione.json"));
|
||||
Concessione concessione=mapper.readerFor(Concessione.class).readValue(new File(TestModel.getBaseFolder(),"Concessione.json"));
|
||||
System.out.println("Concessione is "+concessione.toString());
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue