incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickcha...@apache.org
Subject svn commit: rev 36566 - incubator/depot/trunk/version/src/test/java/org/apache/depot/version
Date Wed, 18 Aug 2004 14:22:32 GMT
Author: nickchalko
Date: Wed Aug 18 07:22:32 2004
New Revision: 36566

Modified:
   incubator/depot/trunk/version/src/test/java/org/apache/depot/version/VersionTestCase.java
Log:
Use !equals instead of  !=

Modified: incubator/depot/trunk/version/src/test/java/org/apache/depot/version/VersionTestCase.java
==============================================================================
--- incubator/depot/trunk/version/src/test/java/org/apache/depot/version/VersionTestCase.java
(original)
+++ incubator/depot/trunk/version/src/test/java/org/apache/depot/version/VersionTestCase.java
Wed Aug 18 07:22:32 2004
@@ -61,21 +61,28 @@
 		Version same = createVersion(getBaseVersionString());
 		assertEquals("Version of " + getBaseVersionString(), base, same);
 		assertEquals("Version of " + getBaseVersionString(), same, base);
-		Version other = base.increment("major");
+		Version other = base.increment(getNonCompatibleIncrement());
 		assertSymetricNotEquals(other, base);
 	}
 
 	/**
+	 * @return
+	 */
+	private String getNonCompatibleIncrement() {
+		return "major";
+	}
+
+	/**
 	 * assert !v1.eqauls(v2) && !v2.equals(v1)
 	 * 
 	 * @param v1
 	 * @param v2
 	 */
 	public void assertSymetricNotEquals(Version v1, Version v2) {
-		assertTrue(v2 + " should not equals " + v1, v2 != v1);
-		assertTrue(v1 + " should not equals " + v2, v1 != v2);
+		assertTrue(v2 + " should not equals " + v1, !v2.equals(v1));
+		assertTrue(v1 + " should not equals " + v2, !v1.equals(v2));
 	}
-	
+
 	/**
 	 * assert v1.eqauls(v2) && v2.equals(v1)
 	 * 
@@ -83,8 +90,8 @@
 	 * @param v2
 	 */
 	public void assertSymetricEquals(Version v1, Version v2) {
-		assertEquals(v2 + " should equal " + v1, v2 ,v1);
-		assertEquals(v1 + " should equal " + v2, v1 , v2);
+		assertEquals(v2 + " should equal " + v1, v2, v1);
+		assertEquals(v1 + " should equal " + v2, v1, v2);
 	}
 
 	/**

Mime
View raw message