Search in sources :

Example 1 with GDSServerVersion

use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.

the class TestV13Authentication method authenticateServiceUsingLegacyAuth.

/**
 * This test assumes that the Firebird 3 config for {@code UserManager} contains {@code Legacy_UserManager}.
 * <p>
 * Replicates the test of {@link org.firebirdsql.management.TestFBServiceManager#testGetServerVersion()}.
 * </p>
 */
@Test
public void authenticateServiceUsingLegacyAuth() throws Exception {
    final String username = "legacyauth";
    final String password = "legacy";
    databaseUserRule.createUser(username, password, "Legacy_UserManager");
    final FBServiceManager fbServiceManager = new FBServiceManager(FBTestProperties.getGdsType());
    fbServiceManager.setHost(FBTestProperties.DB_SERVER_URL);
    fbServiceManager.setPort(FBTestProperties.DB_SERVER_PORT);
    fbServiceManager.setUser(username);
    fbServiceManager.setPassword(password);
    final GDSServerVersion serverVersion = fbServiceManager.getServerVersion();
    assertThat(serverVersion, allOf(notNullValue(), not(equalTo(GDSServerVersion.INVALID_VERSION))));
}
Also used : GDSServerVersion(org.firebirdsql.gds.impl.GDSServerVersion) FBServiceManager(org.firebirdsql.management.FBServiceManager) Test(org.junit.Test)

Example 2 with GDSServerVersion

use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.

the class TestFirebirdVersionMetaData method shouldReturn2_0ForFirebird2_0.

@Test
public void shouldReturn2_0ForFirebird2_0() throws Exception {
    GDSServerVersion version = GDSServerVersion.parseRawVersion("WI-V2.0.7.13318 Firebird 2.0");
    assertEquals(FirebirdVersionMetaData.FIREBIRD_2_0, FirebirdVersionMetaData.getVersionMetaDataFor(version));
}
Also used : GDSServerVersion(org.firebirdsql.gds.impl.GDSServerVersion) Test(org.junit.Test)

Example 3 with GDSServerVersion

use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.

the class TestFirebirdVersionMetaData method shouldReturn2_1ForFirebird2_1.

@Test
public void shouldReturn2_1ForFirebird2_1() throws Exception {
    GDSServerVersion version = GDSServerVersion.parseRawVersion("WI-V2.1.7.18553 Firebird 2.1");
    assertEquals(FirebirdVersionMetaData.FIREBIRD_2_1, FirebirdVersionMetaData.getVersionMetaDataFor(version));
}
Also used : GDSServerVersion(org.firebirdsql.gds.impl.GDSServerVersion) Test(org.junit.Test)

Example 4 with GDSServerVersion

use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.

the class TestFirebirdVersionMetaData method shouldReturn2_5ForFirebird2_5.

@Test
public void shouldReturn2_5ForFirebird2_5() throws Exception {
    GDSServerVersion version = GDSServerVersion.parseRawVersion("WI-V2.5.6.27020 Firebird 2.5");
    assertEquals(FirebirdVersionMetaData.FIREBIRD_2_5, FirebirdVersionMetaData.getVersionMetaDataFor(version));
}
Also used : GDSServerVersion(org.firebirdsql.gds.impl.GDSServerVersion) Test(org.junit.Test)

Example 5 with GDSServerVersion

use of org.firebirdsql.gds.impl.GDSServerVersion in project jaybird by FirebirdSQL.

the class TestFirebirdVersionMetaData method shouldReturn2_0ForFirebird1_5.

@Test
public void shouldReturn2_0ForFirebird1_5() throws Exception {
    GDSServerVersion version = GDSServerVersion.parseRawVersion("WI-V1.5.6.18482 Firebird 1.5");
    assertEquals(FirebirdVersionMetaData.FIREBIRD_2_0, FirebirdVersionMetaData.getVersionMetaDataFor(version));
}
Also used : GDSServerVersion(org.firebirdsql.gds.impl.GDSServerVersion) Test(org.junit.Test)

Aggregations

GDSServerVersion (org.firebirdsql.gds.impl.GDSServerVersion)20 Test (org.junit.Test)17 FirebirdConnection (org.firebirdsql.jdbc.FirebirdConnection)4 FBServiceManager (org.firebirdsql.management.FBServiceManager)4 Connection (java.sql.Connection)3 Properties (java.util.Properties)3 FBTestProperties (org.firebirdsql.common.FBTestProperties)3 JaybirdSystemProperties (org.firebirdsql.gds.JaybirdSystemProperties)3 IConnectionProperties (org.firebirdsql.gds.ng.IConnectionProperties)3 FBManagedConnection (org.firebirdsql.jaybird.xca.FBManagedConnection)3 PooledConnection (javax.sql.PooledConnection)1 XAConnection (javax.sql.XAConnection)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 MethodSource (org.junit.jupiter.params.provider.MethodSource)1