Fixed test units

This commit is contained in:
Fabio Sinibaldi 2021-09-22 11:50:20 +02:00
parent c93ed248a9
commit a4d27b743e
1 changed files with 4 additions and 4 deletions

View File

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