use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class AdvancedActiveMqConsumerTest method createVendorImpl.
@Override
protected BasicActiveMqImplementation createVendorImpl() {
AdvancedActiveMqImplementation result = new AdvancedActiveMqImplementation();
result.getConnectionFactoryProperties().addKeyValuePair(new KeyValuePair("DisableTimeStampsByDefault", "true"));
result.getConnectionFactoryProperties().addKeyValuePair(new KeyValuePair("NestedMapAndListEnabled", "true"));
return result;
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class AdvancedActiveMqImplementationTest method createFactoryProperties.
private static KeyValuePairSet createFactoryProperties() {
KeyValuePairSet props = new KeyValuePairSet();
props.addKeyValuePair(new KeyValuePair("Unsupported_Property", "99"));
props.addAll(createClient53Properties());
props.addAll(createClient59Properties());
return props;
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class AdvancedActiveMqProducerTest method createVendorImpl.
@Override
protected BasicActiveMqImplementation createVendorImpl() {
AdvancedActiveMqImplementation result = new AdvancedActiveMqImplementation();
result.getConnectionFactoryProperties().addKeyValuePair(new KeyValuePair("DisableTimeStampsByDefault", "true"));
result.getConnectionFactoryProperties().addKeyValuePair(new KeyValuePair("NestedMapAndListEnabled", "true"));
result.setPrefetchPolicy(new PrefetchPolicyFactory());
result.setRedeliveryPolicy(new RedeliveryPolicyFactory());
result.setBlobTransferPolicy(new BlobTransferPolicyFactory());
return result;
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class MultiPayloadXmlTransformServiceTest method testXSLT_XslMessageTerminate.
@Test
public void testXSLT_XslMessageTerminate() throws Exception {
MultiPayloadAdaptrisMessage m1 = MessageHelper.createMultiPayloadMessage(PAYLOAD_ID_SOURCE, PROPERTIES.getProperty(KEY_XML_TEST_INPUT));
MultiPayloadXmlTransformService service = createBaseExample();
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 AdapterStateSummaryTest method testSetAdapterStateKeyValuePair.
@Test
public void testSetAdapterStateKeyValuePair() {
AdapterStateSummary s1 = new AdapterStateSummary();
s1.setAdapterState(new KeyValuePair(DEFAULT_KEY, ClosedState.getInstance().getClass().getName()));
assertEquals(DEFAULT_KEY, s1.getAdapterState().getKey());
assertEquals(ClosedState.getInstance().getClass().getName(), s1.getAdapterState().getValue());
try {
s1.setAdapterState(new KeyValuePair("", "ABC"));
fail("Null Key in KeyValuePair");
} catch (IllegalArgumentException expected) {
}
try {
s1.setAdapterState(new KeyValuePair("ABC", ""));
fail("Null Value in KeyValuePair");
} catch (IllegalArgumentException expected) {
}
try {
s1.setAdapterState(null);
fail("Null KeyValuePair");
} catch (IllegalArgumentException expected) {
}
}
Aggregations