use of org.pentaho.di.connections.common.bucket.TestConnectionDetails in project pentaho-kettle by pentaho.
the class ConnectionManagerTest method testSaveConnection.
@Test
public void testSaveConnection() {
addOne();
TestConnectionDetails testConnectionDetails1 = (TestConnectionDetails) connectionManager.getConnectionDetails(TestConnectionProvider.SCHEME, CONNECTION_NAME);
Assert.assertEquals(CONNECTION_NAME, testConnectionDetails1.getName());
}
use of org.pentaho.di.connections.common.bucket.TestConnectionDetails in project pentaho-kettle by pentaho.
the class ConnectionManagerTest method testEncryptedField.
@Test
public void testEncryptedField() throws Exception {
addOne();
TestConnectionDetails testConnectionDetails1 = (TestConnectionDetails) connectionManager.getConnectionDetails(TestConnectionProvider.SCHEME, CONNECTION_NAME);
Assert.assertEquals(PASSWORD, testConnectionDetails1.getPassword());
Assert.assertEquals(PASSWORD2, testConnectionDetails1.getPassword1());
MetaStoreFactory<TestConnectionDetails> metaStoreFactory = new MetaStoreFactory<>(TestConnectionDetails.class, memoryMetaStore, NAMESPACE);
TestConnectionDetails testConnectionDetails = metaStoreFactory.loadElement(CONNECTION_NAME);
Assert.assertTrue(testConnectionDetails.getPassword().startsWith("Encrypted "));
Assert.assertTrue(testConnectionDetails.getPassword1().startsWith("Encrypted "));
}
use of org.pentaho.di.connections.common.bucket.TestConnectionDetails in project pentaho-kettle by pentaho.
the class ConnectionManagerTest method addOne.
private void addOne() {
addProvider();
TestConnectionDetails testConnectionDetails = new TestConnectionDetails();
testConnectionDetails.setDescription(DESCRIPTION);
testConnectionDetails.setName(CONNECTION_NAME);
testConnectionDetails.setPassword(PASSWORD);
testConnectionDetails.setPassword1(PASSWORD2);
connectionManager.save(testConnectionDetails);
}
use of org.pentaho.di.connections.common.bucket.TestConnectionDetails in project pentaho-kettle by pentaho.
the class ConnectionFileProviderTest method addOne.
private void addOne() {
addProvider();
TestConnectionDetails testConnectionDetails = new TestConnectionDetails();
testConnectionDetails.setName(CONNECTION_NAME);
connectionManager.save(testConnectionDetails);
}
Aggregations