use of com.adaptris.core.jms.MessageTypeTranslatorImp in project interlok by adaptris.
the class MessageTypeTranslatorCase method testSetMetadataFilter.
@Test
public void testSetMetadataFilter() throws Exception {
MessageTypeTranslatorImp translator = createTranslator();
assertNull(translator.getMetadataFilter());
assertNotNull(translator.metadataFilter());
assertEquals(NoOpMetadataFilter.class, translator.metadataFilter().getClass());
RegexMetadataFilter filter = new RegexMetadataFilter();
translator.setMetadataFilter(filter);
assertEquals(filter, translator.getMetadataFilter());
assertEquals(filter, translator.metadataFilter());
translator.setMetadataFilter(null);
assertNull(translator.getMetadataFilter());
assertNotNull(translator.metadataFilter());
assertEquals(NoOpMetadataFilter.class, translator.metadataFilter().getClass());
}
use of com.adaptris.core.jms.MessageTypeTranslatorImp in project interlok by adaptris.
the class MessageTypeTranslatorCase method testSetReportAllErrors.
@Test
public void testSetReportAllErrors() throws Exception {
MessageTypeTranslatorImp translator = createTranslator();
assertNull(translator.getReportAllErrors());
assertFalse(translator.reportAllErrors());
translator.setReportAllErrors(Boolean.TRUE);
assertEquals(Boolean.TRUE, translator.getReportAllErrors());
assertTrue(translator.reportAllErrors());
translator.setReportAllErrors(null);
assertNull(translator.getReportAllErrors());
assertFalse(translator.reportAllErrors());
}
Aggregations