org.dbunit.ext.mysql.MySqlMetadataHandler Java Examples
The following examples show how to use
org.dbunit.ext.mysql.MySqlMetadataHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MySqlConnectionFactoryTest.java From jpa-unit with Apache License 2.0 | 6 votes |
@Test public void testCreateConnection() throws DatabaseUnitException { // GIVEN final String schema = "foo"; // WHEN final IDatabaseConnection dbConnection = FACTORY.createConnection(connection, schema); // THEN assertThat(dbConnection, notNullValue()); final Object typeFactory = dbConnection.getConfig().getProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY); assertThat(typeFactory, notNullValue()); assertThat(typeFactory.getClass(), equalTo(MySqlDataTypeFactory.class)); final Object metadataHandler = dbConnection.getConfig().getProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER); assertThat(metadataHandler, notNullValue()); assertThat(metadataHandler.getClass(), equalTo(MySqlMetadataHandler.class)); assertThat(dbConnection.getSchema(), equalTo(schema)); }
Example #2
Source File: RiderDataSource.java From database-rider with Apache License 2.0 | 5 votes |
private IMetadataHandler getMetadataHandler(DBType dbType) { switch (dbType) { case MYSQL: return new MySqlMetadataHandler(); case DB2: return new Db2MetadataHandler(); default: return null; } }