use of org.kie.server.api.marshalling.Marshaller in project droolsjbpm-integration by kiegroup.
the class StringContentJSONTest method testStringContentCaseFile.
@Test
public void testStringContentCaseFile() {
Set<Class<?>> extraClasses = new HashSet<Class<?>>();
Marshaller marshaller = MarshallerFactory.getMarshaller(extraClasses, MarshallingFormat.JSON, this.getClass().getClassLoader());
String jsonMap = "{\n" + " \"case-data\" : {\n" + " \"yearsOfService\" : 1\n" + " },\n" + " \"case-user-assignments\" : {\n" + " },\n" + " \"case-group-assignments\" : {\n" + " }\n" + "}";
StringContentCaseFile map = new StringContentCaseFile(jsonMap);
// content must be of exact value as given in constructor
String marshall = marshaller.marshall(map);
assertEquals(jsonMap, marshall);
}
use of org.kie.server.api.marshalling.Marshaller in project droolsjbpm-integration by kiegroup.
the class MarshallingRoundTripNestedClassesWithAnnotationsTest method testXStream.
@Test
public void testXStream() {
Marshaller marshaller = MarshallerFactory.getMarshaller(getCustomClasses(), MarshallingFormat.XSTREAM, getClass().getClassLoader());
verifyMarshallingRoundTrip(marshaller, createTestObject());
}
use of org.kie.server.api.marshalling.Marshaller in project droolsjbpm-integration by kiegroup.
the class MarshallingRoundTripTest method testXStream.
@Test
public void testXStream() {
Marshaller marshaller = MarshallerFactory.getMarshaller(MarshallingFormat.XSTREAM, getClass().getClassLoader());
verifyMarshallingRoundTrip(marshaller, testObject);
}
use of org.kie.server.api.marshalling.Marshaller in project droolsjbpm-integration by kiegroup.
the class MarshallingRoundTripTest method testJaxb.
@Test
public void testJaxb() {
Marshaller marshaller = MarshallerFactory.getMarshaller(MarshallingFormat.JAXB, getClass().getClassLoader());
verifyMarshallingRoundTrip(marshaller, testObject);
}
use of org.kie.server.api.marshalling.Marshaller in project droolsjbpm-integration by kiegroup.
the class MarshallingRoundTripTest method testJSON.
@Test
public void testJSON() {
Marshaller marshaller = MarshallerFactory.getMarshaller(MarshallingFormat.JSON, getClass().getClassLoader());
verifyMarshallingRoundTrip(marshaller, testObject);
}
Aggregations