Search in sources :

Example 16 with KeyValuePair

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);
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) Test(org.junit.Test)

Example 17 with KeyValuePair

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);
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) Test(org.junit.Test)

Example 18 with KeyValuePair

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);
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) Test(org.junit.Test)

Example 19 with KeyValuePair

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);
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) Test(org.junit.Test)

Example 20 with KeyValuePair

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)));
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) AdaptrisMarshaller(com.adaptris.core.AdaptrisMarshaller) KeyValuePairList(com.adaptris.util.KeyValuePairList) Test(org.junit.Test)

Aggregations

KeyValuePair (com.adaptris.util.KeyValuePair)143 Test (org.junit.Test)79 KeyValuePairSet (com.adaptris.util.KeyValuePairSet)55 AdaptrisMessage (com.adaptris.core.AdaptrisMessage)26 KeyValuePairList (com.adaptris.util.KeyValuePairList)12 StandardJndiImplementation (com.adaptris.core.jms.jndi.StandardJndiImplementation)11 StandaloneProducer (com.adaptris.core.StandaloneProducer)10 Channel (com.adaptris.core.Channel)9 MockMessageProducer (com.adaptris.core.stubs.MockMessageProducer)9 TimeInterval (com.adaptris.util.TimeInterval)9 ServiceException (com.adaptris.core.ServiceException)7 JmsConnection (com.adaptris.core.jms.JmsConnection)6 ArrayList (java.util.ArrayList)6 CoreException (com.adaptris.core.CoreException)5 StandardWorkflow (com.adaptris.core.StandardWorkflow)5 PasProducer (com.adaptris.core.jms.PasProducer)5 MetadataCollection (com.adaptris.core.MetadataCollection)4 MetadataElement (com.adaptris.core.MetadataElement)4 StandaloneConsumer (com.adaptris.core.StandaloneConsumer)4 StandaloneRequestor (com.adaptris.core.StandaloneRequestor)3