Search in sources :

Example 21 with DfUrlAnalyzer

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

the class DfUrlAnalyzerPostgreSQLTest method test_extractCatalog_option_ampersand.

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

Example 22 with DfUrlAnalyzer

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

the class DfUrlAnalyzerPostgreSQLTest method test_extractCatalog_basic.

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

Example 23 with DfUrlAnalyzer

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

the class DfUrlAnalyzerSQLiteTest method test_extractCatalog_nopath.

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

Example 24 with DfUrlAnalyzer

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

the class DfUrlAnalyzerDB2Test method test_extractCatalog_nohost.

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

Example 25 with DfUrlAnalyzer

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

the class DfUrlAnalyzerDB2Test method test_extractCatalog_ampersand.

public void test_extractCatalog_ampersand() throws Exception {
    // ## Arrange ##
    DfUrlAnalyzer analyzer = createTarget("jdbc:db2://localhost:50000/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