Search in sources :

Example 1 with EventHandlerBase

use of com.adaptris.core.EventHandlerBase in project interlok by adaptris.

the class ExampleEventHandlerCase method testSetMarshaller.

@Test
public void testSetMarshaller() throws Exception {
    EventHandlerBase eventHandler = applyConfiguration(newEventHandler(getName()));
    XStreamJsonMarshaller marshaller = (XStreamJsonMarshaller) marshallerFactory.createMarshaller(MarshallingOutput.JSON);
    eventHandler.setMarshaller(marshaller);
    assertEquals(marshaller, eventHandler.getMarshaller());
    assertEquals(marshaller, eventHandler.currentMarshaller());
    eventHandler.setMarshaller(null);
    assertEquals(DefaultMarshaller.getDefaultMarshaller(), eventHandler.currentMarshaller());
}
Also used : XStreamJsonMarshaller(com.adaptris.core.XStreamJsonMarshaller) EventHandlerBase(com.adaptris.core.EventHandlerBase) Test(org.junit.Test)

Aggregations

EventHandlerBase (com.adaptris.core.EventHandlerBase)1 XStreamJsonMarshaller (com.adaptris.core.XStreamJsonMarshaller)1 Test (org.junit.Test)1