Search in sources :

Example 31 with DfUrlAnalyzer

use of org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer in project dbflute-core by dbflute.

the class DfUrlAnalyzerSQLServerTest method test_extractCatalog_noHost.

public void test_extractCatalog_noHost() throws Exception {
    // ## Arrange ##
    DfUrlAnalyzer analyzer = createTarget("jdbc:sqlserver:;DatabaseName=exampledb;");
    // ## Act ##
    String catalog = analyzer.extractCatalog();
    // ## Assert ##
    assertEquals("exampledb", catalog);
}
Also used : DfUrlAnalyzer(org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer)

Example 32 with DfUrlAnalyzer

use of org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer in project dbflute-core by dbflute.

the class DfUrlAnalyzerSQLServerTest method test_extractCatalog_noTerminater.

public void test_extractCatalog_noTerminater() throws Exception {
    // ## Arrange ##
    DfUrlAnalyzer analyzer = createTarget("jdbc:sqlserver://localhost:1433;DatabaseName=exampledb");
    // ## Act ##
    String catalog = analyzer.extractCatalog();
    // ## Assert ##
    assertEquals("exampledb", catalog);
}
Also used : DfUrlAnalyzer(org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer)

Example 33 with DfUrlAnalyzer

use of org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer in project dbflute-core by dbflute.

the class DfUrlAnalyzerSybaseTest method test_extractCatalog_option_question.

public void test_extractCatalog_option_question() throws Exception {
    // ## Arrange ##
    DfUrlAnalyzer analyzer = createTarget("jdbc:sybase:Tds:localhost:5432/exampledb?charSet=UTF-8");
    // ## Act ##
    String catalog = analyzer.extractCatalog();
    // ## Assert ##
    assertEquals("exampledb", catalog);
}
Also used : DfUrlAnalyzer(org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer)

Aggregations

DfUrlAnalyzer (org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer)33 DfUrlAnalyzerFactory (org.dbflute.logic.jdbc.urlanalyzer.factory.DfUrlAnalyzerFactory)3 UnifiedSchema (org.apache.torque.engine.database.model.UnifiedSchema)2 Properties (java.util.Properties)1 DfRequiredPropertyNotFoundException (org.dbflute.exception.DfRequiredPropertyNotFoundException)1 DfConnectionProperties (org.dbflute.properties.assistant.database.DfConnectionProperties)1