Search in sources :

Example 1 with PayloadMessageLogger

use of com.adaptris.core.util.PayloadMessageLogger in project interlok by adaptris.

the class ExampleWorkflowCase method testSetMessageLogger.

@Test
public void testSetMessageLogger() throws Exception {
    AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage();
    WorkflowImp wf = createWorkflowForGenericTests();
    assertNull(wf.getMessageLogger());
    assertNotNull(wf.messageLogger());
    assertEquals(DefaultMessageLogger.class, wf.messageLogger().getClass());
    assertNotNull(wf.messageLogger().toString(msg));
    wf.setMessageLogger(new PayloadMessageLogger());
    assertNotNull(wf.getMessageLogger());
    assertNotNull(wf.messageLogger());
    assertEquals(PayloadMessageLogger.class, wf.messageLogger().getClass());
    assertNotNull(wf.messageLogger().toString(msg));
}
Also used : AdaptrisMessage(com.adaptris.core.AdaptrisMessage) PayloadMessageLogger(com.adaptris.core.util.PayloadMessageLogger) WorkflowImp(com.adaptris.core.WorkflowImp) Test(org.junit.Test)

Aggregations

AdaptrisMessage (com.adaptris.core.AdaptrisMessage)1 WorkflowImp (com.adaptris.core.WorkflowImp)1 PayloadMessageLogger (com.adaptris.core.util.PayloadMessageLogger)1 Test (org.junit.Test)1