Search in sources :

Example 6 with DfUrlAnalyzer

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

the class DfUrlAnalyzerH2Test method test_extractCatalog_option.

public void test_extractCatalog_option() throws Exception {
    // ## Arrange ##
    DfUrlAnalyzer analyzer = createTarget("jdbc:h2:file:../src/main/resources/ponpon/exampledb;charSet=UTF-8");
    // ## Act ##
    String catalog = analyzer.extractCatalog();
    // ## Assert ##
    assertEquals("exampledb", catalog);
}
Also used : DfUrlAnalyzer(org.dbflute.logic.jdbc.urlanalyzer.DfUrlAnalyzer)

Example 7 with DfUrlAnalyzer

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

the class DfUrlAnalyzerH2Test method test_extractCatalog_nopath.

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

Example 8 with DfUrlAnalyzer

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

the class DfUrlAnalyzerMySQLTest method test_extractCatalog_option_question.

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

Example 9 with DfUrlAnalyzer

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

the class DfUrlAnalyzerMySQLTest method test_extractCatalog_nohost.

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

Example 10 with DfUrlAnalyzer

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

the class DfUrlAnalyzerSQLServerTest method test_extractCatalog_noPort.

public void test_extractCatalog_noPort() throws Exception {
    // ## Arrange ##
    DfUrlAnalyzer analyzer = createTarget("jdbc:sqlserver://localhost;DatabaseName=exampledb");
    // ## 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