Fixed test
This commit is contained in:
parent
eb5592825f
commit
da27da1de7
|
@ -3,9 +3,11 @@
|
|||
*/
|
||||
package org.gcube.vremanagement.executor.api.types;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -18,6 +20,7 @@ import javax.xml.bind.util.JAXBSource;
|
|||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.gcube.vremanagement.executor.exception.InvalidPluginStateEvolutionException;
|
||||
import org.gcube.vremanagement.executor.json.SEMapper;
|
||||
import org.gcube.vremanagement.executor.plugin.Plugin;
|
||||
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
||||
import org.gcube.vremanagement.executor.plugin.PluginState;
|
||||
|
@ -26,6 +29,9 @@ import org.junit.Test;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*
|
||||
|
@ -136,4 +142,11 @@ public class SerializationTest {
|
|||
logger.debug("UnMarshalled : {}", pesUnmarshalled);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testUnmarshallPluginList() throws JsonParseException, JsonMappingException, IOException {
|
||||
String pluginList = "[{\"@class\":\"PluginDeclaration\",\"description\":\"Hello World Description\",\"supportedCapabilities\":{\"FakeKey\":\"FakeValue\"},\"version\":\"1.1.2\",\"name\":\"HelloWorld\"}]";
|
||||
List<PluginDeclaration> list = SEMapper.getInstance().unmarshalList(PluginDeclaration.class, pluginList);
|
||||
logger.debug("{}", SEMapper.getInstance().marshal(PluginDeclaration.class, list));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue