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());
}
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());
}
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);
}
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());
}
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;
}
Aggregations