package io.shardingsphere.core.metadata.datasource;

import io.shardingsphere.core.constant.DatabaseType;
import io.shardingsphere.core.metadata.datasource.dialect.H2DataSourceMetaData;
import io.shardingsphere.core.metadata.datasource.dialect.MySQLDataSourceMetaData;
import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class DataSourceMetaDataFactoryTest {
    
    @Test
    public void assertAllNewInstanceForH2() {
        assertTrue((DataSourceMetaDataFactory.newInstance(DatabaseType.H2, "jdbc:h2:mem:ds_0;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL") instanceof H2DataSourceMetaData));
    }
    
    @Test
    public void assertAllNewInstanceForMySQL() {
        assertTrue((DataSourceMetaDataFactory.newInstance(DatabaseType.MySQL, "jdbc:mysql://127.0.0.1:3306/db_0") instanceof MySQLDataSourceMetaData));
    }
}
@@ -258,24 +258,108 @@
 ceMetaData;%0A
+import io.shardingsphere.core.metadata.datasource.dialect.OracleDataSourceMetaData;%0A
 import org.j
@@ -931,9 +931,241 @@
 ;%0A    %7D%0A
+    %0A    @Test%0A    public void assertAllNewInstanceForOracle() %7B%0A        assertTrue((DataSourceMetaDataFactory.newInstance(DatabaseType.Oracle, %22jdbc:oracle:thin:@//127.0.0.1:3306/ds_0%22) instanceof OracleDataSourceMetaData));%0A    %7D%0A
 %7D

add test for oracle