Search in sources :

Example 26 with KeyValuePairSet

use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.

the class ConfigurationPreProcessorFactoryTest method testKeyValuePairSet_NoValues.

@Test
public void testKeyValuePairSet_NoValues() throws Exception {
    when(mockPropertyLoader.loadPropertyFile(anyString())).thenReturn(new Properties());
    preProcessorFactory.setPropertyLoader(mockPropertyLoader);
    assertEquals(0, preProcessorFactory.load("", new KeyValuePairSet()).size());
}
Also used : Properties(java.util.Properties) JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) KeyValuePairSet(com.adaptris.util.KeyValuePairSet) Test(org.junit.Test)

Example 27 with KeyValuePairSet

use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.

the class ConfigurationPreProcessorFactoryTest method testKeyValuePairSet_MisConfiguredPreProcessorNoClassName.

@Test
public void testKeyValuePairSet_MisConfiguredPreProcessorNoClassName() throws Exception {
    when(mockPropertyLoader.loadPropertyFile(anyString())).thenReturn(new Properties());
    preProcessorFactory.setPropertyLoader(mockPropertyLoader);
    assertEquals(0, preProcessorFactory.load("testPreProcessor", new KeyValuePairSet()).size());
}
Also used : Properties(java.util.Properties) JunitBootstrapProperties(com.adaptris.core.stubs.JunitBootstrapProperties) KeyValuePairSet(com.adaptris.util.KeyValuePairSet) Test(org.junit.Test)

Example 28 with KeyValuePairSet

use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.

the class DocumentBuilderFactoryBuilder method withFeatures.

public DocumentBuilderFactoryBuilder withFeatures(Map<String, Boolean> f) {
    Map<String, Boolean> featureList = Args.notNull(f, "features");
    KeyValuePairSet newFeatures = new KeyValuePairSet();
    for (Map.Entry<String, Boolean> entry : featureList.entrySet()) {
        newFeatures.add(new KeyValuePair(entry.getKey(), String.valueOf(entry.getValue())));
    }
    return withFeatures(newFeatures);
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) KeyValuePairSet(com.adaptris.util.KeyValuePairSet) Map(java.util.Map)

Example 29 with KeyValuePairSet

use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.

the class ConfiguredRequestHeadersTest method testSetHandlers.

@Test
public void testSetHandlers() throws Exception {
    ConfiguredRequestHeaders headers = new ConfiguredRequestHeaders();
    assertNotNull(headers.getHeaders());
    assertEquals(0, headers.getHeaders().size());
    String name = testName.getMethodName();
    headers.getHeaders().add(new KeyValuePair(name, name));
    assertEquals(1, headers.getHeaders().size());
    headers.setHeaders(new KeyValuePairSet());
    assertEquals(0, headers.getHeaders().size());
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) KeyValuePairSet(com.adaptris.util.KeyValuePairSet) Test(org.junit.Test)

Example 30 with KeyValuePairSet

use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.

the class InlineConfigRepositoryBuilder method config.

protected KeyValuePairSet config() {
    KeyValuePairSet kvps = new KeyValuePairSet();
    kvps.add(new KeyValuePair("compression.s2c", "zlib,none"));
    kvps.add(new KeyValuePair("compression.c2s", "zlib,none"));
    kvps.add(new KeyValuePair("StrictHostKeyChecking", BooleanUtils.toStringYesNo(strictHostChecking)));
    kvps.add(new KeyValuePair(SftpClient.SSH_PREFERRED_AUTHENTICATIONS, SftpClient.NO_KERBEROS_AUTH));
    return kvps;
}
Also used : KeyValuePair(com.adaptris.util.KeyValuePair) KeyValuePairSet(com.adaptris.util.KeyValuePairSet)

Aggregations

KeyValuePairSet (com.adaptris.util.KeyValuePairSet)62 KeyValuePair (com.adaptris.util.KeyValuePair)54 Test (org.junit.Test)30 AdaptrisMessage (com.adaptris.core.AdaptrisMessage)5 StandardJndiImplementation (com.adaptris.core.jms.jndi.StandardJndiImplementation)5 TimeInterval (com.adaptris.util.TimeInterval)4 SimpleFactoryConfiguration (com.adaptris.core.jms.jndi.SimpleFactoryConfiguration)3 Connection (java.sql.Connection)3 ArrayList (java.util.ArrayList)3 CoreException (com.adaptris.core.CoreException)2 ServiceException (com.adaptris.core.ServiceException)2 StandaloneConsumer (com.adaptris.core.StandaloneConsumer)2 StandaloneProducer (com.adaptris.core.StandaloneProducer)2 Execution (com.adaptris.core.common.Execution)2 MetadataDataInputParameter (com.adaptris.core.common.MetadataDataInputParameter)2 StringPayloadDataInputParameter (com.adaptris.core.common.StringPayloadDataInputParameter)2 JdbcConnection (com.adaptris.core.jdbc.JdbcConnection)2 JunitBootstrapProperties (com.adaptris.core.stubs.JunitBootstrapProperties)2 MockMessageListener (com.adaptris.core.stubs.MockMessageListener)2 ComboPooledDataSource (com.mchange.v2.c3p0.ComboPooledDataSource)2