public void testAtMajorMinor() {
    assertTrue(_10_4.atMajorMinor(10, 4));

    assertFalse(_10_2.atMajorMinor(10, 1));
    assertFalse(_10_2.atMajorMinor(10, 3));
    assertFalse(_10_2.atMajorMinor(11, 2));
  }
 public void testCreateGet() {
   DerbyVersion v = new DerbyVersion(1, 2, 3, 4);
   assertEquals(1, v.getMajor());
   assertEquals(2, v.getMinor());
   assertEquals(3, v.getFixpack());
   assertEquals(4, v.getPoint());
 }
  public void testAtMost() {
    assertTrue(_10_4.atMost(_10_5));
    assertTrue(_10_8.atMost(_11_9));

    assertFalse(_10_7.atMost(_10_2));
    assertFalse(_11_0.atMost(_10_5_3_0));
  }
  public void testGreaterThan() {
    assertTrue(_10_5_3_0.greaterThan(_10_5_2_0));
    assertTrue(_10_5_3_0.greaterThan(_10_5_1_1));
    assertTrue(_10_5_3_0.greaterThan(_10_2));

    assertFalse(_10_2.greaterThan(_10_3));
    assertFalse(_10_8.greaterThan(_11_0));
  }
  public void testEquals() {
    assertTrue(_10_6.equals(_10_6));

    assertFalse(_10_2.equals(this));
    assertFalse(_10_2.equals(null));
    assertFalse(_11_0.equals(_10_8));
    assertFalse(_10_5_2_0.equals(_10_5_3_0));
  }
  public void testCompareTo() {
    assertTrue(_10_5_1_1.compareTo(_10_2) > 0);
    assertTrue(_10_5_1_1.compareTo(_10_8) < 0);
    assertTrue(_11_0.compareTo(_11_9) < 0);

    assertEquals(0, _11_0.compareTo(_11_0));
    assertEquals(0, _10_2.compareTo(_10_2));
  }
  public void testAtLeast() {
    assertTrue(_10_4.atLeast(_10_4));
    assertTrue(_10_4.atLeast(_10_3));
    assertTrue(_10_5_2_0.atLeast(_10_5_1_1));

    assertFalse(_10_2.atLeast(_10_4));
    assertFalse(_10_2.atLeast(_11_0));
    assertFalse(_10_5_1_1.atLeast(_10_5_3_0));
  }
  public void testLessThan() {
    assertTrue(_10_2.lessThan(_10_2_2_0));
    assertTrue(_10_2.lessThan(_10_3));
    assertTrue(_10_5.lessThan(_10_5_1_1));
    assertTrue(_10_5_1_1.lessThan(_10_5_2_0));
    assertTrue(_10_5_2_0.lessThan(_10_5_3_0));
    assertTrue(_10_8_1_2.lessThan(_11_0));
    assertTrue(_10_8_1_2.lessThan(_11_9));

    assertFalse(_10_5.lessThan(_10_4));
    assertFalse(_10_5.lessThan(_10_5));
    assertFalse(_11_0.lessThan(_10_8));
    assertFalse(_11_9.lessThan(_10_7));
  }
  public void testAtMajorMinorOf() {
    assertTrue(_10_5.atMajorMinorOf(_10_5_1_1));
    assertTrue(_10_5.atMajorMinorOf(_10_5_2_0));
    assertTrue(_10_5.atMajorMinorOf(_10_5_3_0));
    assertTrue(_10_5_3_0.atMajorMinorOf(_10_5_3_0));
    assertTrue(_10_5_3_0.atMajorMinorOf(_10_5_1_1));

    assertFalse(_10_5_2_0.atMajorMinorOf(_10_3));
    assertFalse(_10_5_2_0.atMajorMinorOf(_11_9));
    assertFalse(_10_5_2_0.atMajorMinorOf(_10_2));
    assertFalse(_10_5_2_0.atMajorMinorOf(_10_2_2_0));
  }
  public void testParseString() {
    DerbyVersion dv = DerbyVersion.parseVersionString("10.9.0.0 alpha - (1180861M)");
    assertTrue(dv.equals(_10_9));
    assertEquals(0, dv.compareTo(_10_9));

    dv = DerbyVersion.parseVersionString("10.8.1.2");
    assertTrue(dv.equals(_10_8_1_2));
    assertEquals(0, dv.compareTo(_10_8_1_2));

    dv = DerbyVersion.parseVersionString("   10.8.1.2   ");
    assertTrue(dv.equals(_10_8_1_2));
    assertEquals(0, dv.compareTo(_10_8_1_2));

    try {
      dv = DerbyVersion.parseVersionString("10.8.1");
      fail("should have failed");
    } catch (IllegalArgumentException iae) {
      // As expected.
    }

    try {
      dv = DerbyVersion.parseVersionString("10.8.1.");
      fail("should have failed");
    } catch (IllegalArgumentException iae) {
      // As expected.
    }

    try {
      dv = DerbyVersion.parseVersionString("10.8.1.two");
      fail("should have failed");
    } catch (IllegalArgumentException iae) {
      // As expected.
    }
  }
 public void testGetPoint() {
   assertEquals(1, _10_5_1_1.getPoint());
   assertEquals(0, _10_8.getPoint());
   assertEquals(9, _11_9.getPoint());
 }
 public void testGetFixpack() {
   assertEquals(1, _10_5_1_1.getFixpack());
   assertEquals(0, _10_8.getFixpack());
   assertEquals(9, _11_9.getFixpack());
 }
 public void testGetMinor() {
   assertEquals(5, _10_5_1_1.getMinor());
   assertEquals(8, _10_8.getMinor());
   assertEquals(9, _11_9.getMinor());
 }
 public void testGetMajor() {
   assertEquals(10, _10_5_1_1.getMajor());
   assertEquals(10, _10_8.getMajor());
   assertEquals(11, _11_9.getMajor());
 }