AppVersion { public static SemanticVersion getVersion() { return INST.getVersion(); }  static String getName(); static SemanticVersion getVersion(); static String getVersionString(); static int getMajor(); static int getMinor(); static int getPatch(); static String getBuildId(); static String getSpecName(); static List<String> getSpecVersions(); static String getLatestSpecVersion();  }
@Test void compareVersions() { Version old = new Version(null, "1.0.0", null, null); Version new1 = new Version(null, "1.1.0", null, null); Version new2 = new Version(null, "1.1.0", null, null); Version snap = new Version(null, "1.1.0-rc1", null, null); Assert.assertTrue(old.getVersion().isOlder(new1.getVersion())); Assert.assertFalse(new1.getVersion().isOlder(old.getVersion())); Assert.assertFalse(new1.getVersion().isNewer(new2.getVersion())); Assert.assertFalse(new2.getVersion().isNewer(new1.getVersion())); Assert.assertFalse(new1.getVersion().isOlder(new2.getVersion())); Assert.assertFalse(new2.getVersion().isOlder(new1.getVersion())); Assert.assertTrue(new1.getVersion().isSame(new2.getVersion())); Assert.assertFalse(new1.getVersion().isSame(snap.getVersion())); Assert.assertTrue(new1.getVersion().isNewer(snap.getVersion())); }