use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class SimpleFactoryConfigurationTest method testApplyQueueConnectionFactory_NonFloat.
@Test
public void testApplyQueueConnectionFactory_NonFloat() throws Exception {
SimpleFactoryConfiguration extras = create(new KeyValuePair(SOME_FLOAT_VALUE, "fred"));
DummyConnectionFactory mycf = new DummyConnectionFactory();
extras.applyConfiguration(mycf);
doBaseAssertions(mycf);
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class SimpleFactoryConfigurationTest method testApplyQueueConnectionFactory_NonBoolean.
@Test
public void testApplyQueueConnectionFactory_NonBoolean() throws Exception {
SimpleFactoryConfiguration extras = create(new KeyValuePair(SOME_BOOLEAN_VALUE, "fred"));
DummyConnectionFactory mycf = new DummyConnectionFactory();
extras.applyConfiguration(mycf);
doBaseAssertions(mycf);
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class SimpleFactoryConfigurationTest method testApplyQueueConnectionFactory_TwoParams.
@Test
public void testApplyQueueConnectionFactory_TwoParams() throws Exception {
SimpleFactoryConfiguration extras = create(new KeyValuePair(TWO_VALUES_TOGETHER, "fred"));
DummyConnectionFactory mycf = new DummyConnectionFactory();
extras.applyConfiguration(mycf);
doBaseAssertions(mycf);
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class SimpleFactoryConfigurationTest method testApplyQueueConnectionFactory_NonInteger.
@Test
public void testApplyQueueConnectionFactory_NonInteger() throws Exception {
SimpleFactoryConfiguration extras = create(new KeyValuePair(SOME_INT_VALUE, "fred"));
DummyConnectionFactory mycf = new DummyConnectionFactory();
extras.applyConfiguration(mycf);
doBaseAssertions(mycf);
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class IdentityBuilderTest method testCompositeMetadataIdentityBuilder_RoundTrip.
@Test
public void testCompositeMetadataIdentityBuilder_RoundTrip() throws Exception {
MappedMetadataIdentityBuilder mapped = new MappedMetadataIdentityBuilder(new KeyValuePairList(Arrays.asList(new KeyValuePair[] { new KeyValuePair(MAPPED_USER, USER), new KeyValuePair(MAPPED_PASSWORD, PASSWORD) })));
MetadataIdentityBuilder metadata = new MetadataIdentityBuilder(Arrays.asList(USER, PASSWORD, ROLE));
// Due to order, we should get the mapped-user becoming the "user" etc.
CompositeIdentityBuilder builder = new CompositeIdentityBuilder(new ArrayList<IdentityBuilder>(Arrays.asList(metadata, mapped)));
AdaptrisMarshaller m = DefaultMarshaller.getDefaultMarshaller();
assertRoundtripEquality(builder, m.unmarshal(m.marshal(builder)));
}
Aggregations