@Test public void testGreaterMajorMinor() { ZendServerVersion v = ZendServerVersion.byName("7.0"); assertEquals(1, v.compareTo(ZendServerVersion.v6_0_0)); assertEquals(1, v.compareTo(ZendServerVersion.v6_0_X)); assertEquals(1, v.compareTo(ZendServerVersion.v6_X_X)); }
@Test public void testEqualMajorBuild() { ZendServerVersion v = ZendServerVersion.byName("6.0.7"); assertEquals(1, v.compareTo(ZendServerVersion.v6_0_0)); assertEquals(0, v.compareTo(ZendServerVersion.v6_0_X)); assertEquals(0, v.compareTo(ZendServerVersion.v6_X_X)); }
@Test public void testLessMajorMinor() { ZendServerVersion v = ZendServerVersion.byName("5.0"); assertEquals(-1, v.compareTo(ZendServerVersion.v6_0_0)); assertEquals(-1, v.compareTo(ZendServerVersion.v6_0_X)); assertEquals(-1, v.compareTo(ZendServerVersion.v6_X_X)); }
@Test public void testEqualFull() { ZendServerVersion v = ZendServerVersion.byName("6.0.0"); assertEquals(0, v.compareTo(ZendServerVersion.v6_0_0)); assertEquals(0, v.compareTo(ZendServerVersion.v6_0_X)); assertEquals(0, v.compareTo(ZendServerVersion.v6_X_X)); }