use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class AdapterStateSummaryTest method testToString.
@Test
public void testToString() {
AdapterStateSummary s1 = new AdapterStateSummary();
s1.addChannelState(new KeyValuePair(DEFAULT_KEY, ClosedState.getInstance().getClass().getName()));
assertNotNull(s1.toString());
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class JdbcMapInsert method buildStatementParam.
protected StatementParam buildStatementParam(String key, final String value) {
KeyValuePair kp = fieldMappings().getKeyValuePair(key);
StatementParam result = (i, p) -> {
p.setString(i, value);
};
if (kp != null) {
result = basicWrapper(kp, value);
if (result == null) {
result = reflectConversion(kp.getValue(), value);
}
}
return result;
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class FtpConsumerTest method create.
private FtpConnection create(FakeFtpServer server) {
FtpConnection consumeConnection = new FtpConnection();
consumeConnection.setDefaultControlPort(server.getServerControlPort());
consumeConnection.setDefaultPassword(DEFAULT_PASSWORD);
consumeConnection.setDefaultUserName(DEFAULT_USERNAME);
consumeConnection.setCacheConnection(true);
consumeConnection.setAdditionalDebug(true);
KeyValuePairSet settings = new KeyValuePairSet();
settings.add(new KeyValuePair(ClientSettings.FTP.RemoteVerificationEnabled.name(), "false"));
consumeConnection.setAdditionalSettings(settings);
return consumeConnection;
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class ReplaceNodeTest method testSetNamespaceContext.
@Test
public void testSetNamespaceContext() {
ReplaceNode obj = new ReplaceNode();
assertNull(obj.getNamespaceContext());
KeyValuePairSet kvps = new KeyValuePairSet();
kvps.add(new KeyValuePair("hello", "world"));
obj.setNamespaceContext(kvps);
assertEquals(kvps, obj.getNamespaceContext());
obj.setNamespaceContext(null);
assertNull(obj.getNamespaceContext());
}
use of com.adaptris.util.KeyValuePair in project interlok by adaptris.
the class SimpleNamespaceContextTest method createNamespaceEntries.
static KeyValuePairSet createNamespaceEntries() {
KeyValuePairSet result = new KeyValuePairSet();
result.add(new KeyValuePair("xsd", "http://www.w3.org/2001/XMLSchema"));
result.add(new KeyValuePair("xs", "http://www.w3.org/2001/XMLSchema"));
return result;
}
Aggregations