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 36328 - in incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing: . api complex field
Date Fri, 13 Aug 2004 06:50:59 GMT
Author: nickchalko
Date: Thu Aug 12 23:50:58 2004
New Revision: 36328

Modified:
   incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/InterfaceBase1.java
   incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/PseudoInterfaceTests.java
   incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/api/APISampleTests.java
   incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/complex/CompoundSampleTests.java
   incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/field/FieldSampleTests.java
Log:
Use the junit pattern  assertXXX

Modified: incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/InterfaceBase1.java
==============================================================================
--- incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/InterfaceBase1.java
(original)
+++ incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/InterfaceBase1.java
Thu Aug 12 23:50:58 2004
@@ -40,13 +40,13 @@
 		super(arg0);
 	}
 
-	protected void compare(Object direct, VersionInformation info)
+	protected void assertEquals(Object direct, VersionInformation info)
 		throws VersionException {
 		assertNotNull("Loaded Information for :" + direct, info);
-		compare(direct, info.getLoadContext());
+		assertEquals(direct, info.getLoadContext());
 	}
 
-	protected void compare(Object direct, VersionLoadContext context)
+	protected void assertEquals(Object direct, VersionLoadContext context)
 		throws VersionException {
 		//
 		assertNotNull("Context Extracted for :" + direct, context);
@@ -57,10 +57,10 @@
 			"VersionData extracted for :" + direct,
 			ApacheVersion.fromVersion(version).getVersionData());
 
-		compare(direct, context.getVersionMarker());
+		assertEquals(direct, context.getVersionMarker());
 	}
 
-	protected void compare(Object direct, VersionMarker marker) {
+	protected void assertEquals(Object direct, VersionMarker marker) {
 		assertNotNull("VersionMarker exists for :" + direct, marker);
 
 		if (direct instanceof SimpleVersionSignature) {

Modified: incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/PseudoInterfaceTests.java
==============================================================================
--- incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/PseudoInterfaceTests.java
(original)
+++ incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/PseudoInterfaceTests.java
Thu Aug 12 23:50:58 2004
@@ -32,17 +32,17 @@
 			new ApacheVersionMarkerInterfaceProxy(
 				new VersionIdentifier("Testing"));
 
-		match(proxy, StandardPseudoInterface.COMPOUND, true);
-		match(proxy, StandardPseudoInterface.DESCRIBED, true);
-		match(proxy, StandardPseudoInterface.ATTRIBUTED, true);
-		match(proxy, StandardPseudoInterface.ANNOTATED, true);
-		match(proxy, StandardPseudoInterface.COMPLEX, false);
+		assertMatch(proxy, StandardPseudoInterface.COMPOUND, true);
+		assertMatch(proxy, StandardPseudoInterface.DESCRIBED, true);
+		assertMatch(proxy, StandardPseudoInterface.ATTRIBUTED, true);
+		assertMatch(proxy, StandardPseudoInterface.ANNOTATED, true);
+		assertMatch(proxy, StandardPseudoInterface.COMPLEX, false);
 		
 		//:TODO: false ??
-		match(proxy, StandardPseudoInterface.FIELD, false);
+		assertMatch(proxy, StandardPseudoInterface.FIELD, false);
 	}
 
-	private void match(
+	private void assertMatch(
 		Object instance,
 		PseudoInterface pseudoInterface,
 		boolean matchExpected) {

Modified: incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/api/APISampleTests.java
==============================================================================
--- incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/api/APISampleTests.java
(original)
+++ incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/api/APISampleTests.java
Thu Aug 12 23:50:58 2004
@@ -50,13 +50,13 @@
 		VersionMarker direct =
 			new org.apache.depot.version.version.Version();
 		VersionLoadContext context = m_loader.load(direct.getClass());
-		compare(direct, context);
+		assertEquals(direct, context);
 	}
 	
 	public void testAPI2() throws VersionException {
 		VersionMarker direct =
 			new org.apache.depot.version.version.Version();
 		VersionInformation info = m_resolver.resolve(direct.getClass());
-		compare(direct, info.getLoadContext());
+		assertEquals(direct, info.getLoadContext());
 	}
 }

Modified: incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/complex/CompoundSampleTests.java
==============================================================================
--- incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/complex/CompoundSampleTests.java
(original)
+++ incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/complex/CompoundSampleTests.java
Thu Aug 12 23:50:58 2004
@@ -53,7 +53,7 @@
         CompoundAttributedSampleVersion direct =
             new CompoundAttributedSampleVersion();
         VersionLoadContext context = m_loader.load(direct.getClass());
-		compare(direct, context);
+		assertEquals(direct, context);
     }
 //
 //    public void testComplexInterface3() throws VersionException {

Modified: incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/field/FieldSampleTests.java
==============================================================================
--- incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/field/FieldSampleTests.java
(original)
+++ incubator/depot/trunk/version/src/test/java/org/apache/depot/version/interfacing/field/FieldSampleTests.java
Thu Aug 12 23:50:58 2004
@@ -40,7 +40,7 @@
 		VersionInformation info =
 			m_runtime.getContext().getResolver().resolve(
 				direct.getClass());
-		compare(direct, info);
+		assertEquals(direct, info);
 	}
 
 	public void testFieldInterface2() throws VersionException {
@@ -49,6 +49,6 @@
 			m_runtime.getContext().getResolver().resolve(
 				direct.getClass());
 
-		compare(direct, info);
+		assertEquals(direct, info);
 	}
 }

Mime
View raw message