use of com.adaptris.core.util.TruncateMetadata in project interlok by adaptris.
the class XpathMetadataServiceTest method testDoService_NotXML.
@Test
public void testDoService_NotXML() throws Exception {
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("ABCDEFG");
XpathMetadataService service = new XpathMetadataService().withMetadataLogger(new TruncateMetadata(20));
service.setXpathQueries(new ArrayList<XpathQuery>(Arrays.asList(new ConfiguredXpathQuery("source", "//source-id"), new ConfiguredXpathQuery("destination", "//destination-id"))));
try {
execute(service, msg);
fail();
} catch (ServiceException expected) {
}
}
use of com.adaptris.core.util.TruncateMetadata in project interlok by adaptris.
the class MetadataServiceImplTest method testMetadataLogger.
@Test
public void testMetadataLogger() {
TruncateMetadata logger = new TruncateMetadata(10);
withMetadataLogger(logger);
assertNotNull(getMetadataLogger());
assertEquals(logger, getMetadataLogger());
assertEquals(TruncateMetadata.class, getMetadataLogger().getClass());
}
Aggregations