use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class XmlTransformServiceTest method testXSLT_XslMessageTerminate.
@Test
public void testXSLT_XslMessageTerminate() throws Exception {
AdaptrisMessage m1 = MessageHelper.createMessage(PROPERTIES.getProperty(KEY_XML_TEST_INPUT));
XmlTransformService service = new XmlTransformService();
XsltTransformerFactory fac = new XsltTransformerFactory();
fac.getTransformerFactoryAttributes().add(new KeyValuePair("http://saxon.sf.net/feature/messageEmitterClass", MessageWarner.class.getCanonicalName()));
fac.getTransformerFactoryFeatures().add(new KeyValuePair(XMLConstants.FEATURE_SECURE_PROCESSING, "true"));
service.setXmlTransformerFactory(fac);
service.setUrl(PROPERTIES.getProperty(KEY_XML_TEST_TRANSFORM_URL_XSL_MESSAGE));
try {
execute(service, m1);
fail();
} catch (ServiceException expected) {
assertExceptionCause(expected, TransformerException.class, UncheckedXPathException.class);
}
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class XmlRuleValidatorTest method createNamespaceHolder.
static KeyValuePairSet createNamespaceHolder() {
KeyValuePairSet result = new KeyValuePairSet();
result.add(new KeyValuePair("titan", "http://www.adaptris.com/titans"));
result.add(new KeyValuePair("olympian", "http://www.adaptris.com/olympians"));
return result;
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class MetadataHelperTest method testConvertFromKeyValuePairs.
@Test
public void testConvertFromKeyValuePairs() {
KeyValuePairCollection elements = new KeyValuePairCollection();
elements.add(new KeyValuePair("test", "value"));
assertNotNull(convertFromKeyValuePairs(elements));
assertTrue(convertFromKeyValuePairs(elements).contains(new MetadataElement("test", "")));
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class ResolvableExpressionParameterTest method setUp.
@Before
public void setUp() throws Exception {
message = createMessage();
message.setContent(CONTENT, "UTF-8");
expressions = new KeyValuePairList();
expressions.add(new KeyValuePair("beer", CONTENT));
existing = new HashMap<>();
existing.put("key", "value");
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class DocumentBuilderFactoryBuilderTest method createNamespaceEntries.
public static KeyValuePairSet createNamespaceEntries() {
KeyValuePairSet result = new KeyValuePairSet();
result.add(new KeyValuePair("xsd", "http://www.w3.org/2001/XMLSchema"));
result.add(new KeyValuePair("xs", "http://www.w3.org/2001/XMLSchema"));
return result;
}
Aggregations