コード例 #1
0
  @Test
  public void testParse21() throws Exception {
    GDSServerVersion version = GDSServerVersion.parseRawVersion(TEST_VERSION_21);

    assertEquals("WI", version.getPlatform());
    assertEquals("V", version.getType());
    assertEquals(2, version.getMajorVersion());
    assertEquals(1, version.getMinorVersion());
    assertEquals(3, version.getVariant());
    assertEquals(18185, version.getBuildNumber());
    assertEquals("Firebird 2.1", version.getServerName());
    assertEquals("WI-V2.1.3.18185 Firebird 2.1/tcp (Ramona)/P10", version.getExtendedServerName());
    assertEquals("WI-V2.1.3.18185", version.getFullVersion());
  }
コード例 #2
0
  /** Check if version with a number in the platform (ie Sparc 4) is correctly parsed */
  @Test
  public void testParseSparcVersion() throws Exception {
    GDSServerVersion version = GDSServerVersion.parseRawVersion(TEST_NO_EXTENDED_INFO_SPARC);

    assertEquals("S4", version.getPlatform());
    assertEquals("V", version.getType());
    assertEquals(2, version.getMajorVersion());
    assertEquals(1, version.getMinorVersion());
    assertEquals(3, version.getVariant());
    assertEquals(18185, version.getBuildNumber());
    assertEquals("Firebird 2.1", version.getServerName());
    assertEquals(null, version.getExtendedServerName());
    assertEquals("S4-V2.1.3.18185", version.getFullVersion());
  }
コード例 #3
0
  @Test
  public void testParse15() throws Exception {
    GDSServerVersion version = GDSServerVersion.parseRawVersion(TEST_VERSION_15);

    assertEquals("WI", version.getPlatform());
    assertEquals("V", version.getType());
    assertEquals(1, version.getMajorVersion());
    assertEquals(5, version.getMinorVersion());
    assertEquals(2, version.getVariant());
    assertEquals(4731, version.getBuildNumber());
    assertEquals("Firebird 1.5", version.getServerName());
    assertEquals("WI-V1.5.2.4731 Firebird 1.5/tcp (PCRORO)/P10", version.getExtendedServerName());
    assertEquals("WI-V1.5.2.4731", version.getFullVersion());
  }