use of com.ctrip.platform.dal.dao.configure.file.PropertyFileConnectionStringProvider in project dal by ctripcorp.
the class PropertyFileConnectionStringProviderTest method testPropertyFileConnectionStringProvider.
@Test
public void testPropertyFileConnectionStringProvider() throws Exception {
PropertyFileConnectionStringProvider provider = new PropertyFileConnectionStringProvider();
Set<String> names = new HashSet<>();
names.add(NAME);
Map<String, DataSourceConfigure> map = provider.getConnectionStrings(names);
DataSourceConfigure configure = map.get(NAME);
Assert.assertEquals(configure.getUserName(), "testUser");
Assert.assertEquals(configure.getPassword(), "testPassword");
Assert.assertEquals(configure.getConnectionUrl(), "jdbc:mysql://testIP:3306/testDb");
Assert.assertEquals(configure.getDriverClass(), "com.mysql.jdbc.Driver");
}
Aggregations