commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kohs...@apache.org
Subject svn commit: r279715 - /jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/ContinuationTests.java
Date Fri, 09 Sep 2005 06:25:51 GMT
Author: kohsuke
Date: Thu Sep  8 23:25:49 2005
New Revision: 279715

URL: http://svn.apache.org/viewcvs?rev=279715&view=rev
Log:
extending Assert is a common practice to invoke JUnit assertion methods quickly.

Modified:
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/ContinuationTests.java

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/ContinuationTests.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/ContinuationTests.java?rev=279715&r1=279714&r2=279715&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/ContinuationTests.java
(original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/ContinuationTests.java
Thu Sep  8 23:25:49 2005
@@ -15,16 +15,10 @@
  */
 package org.apache.commons.javaflow;
 
-import java.lang.reflect.Method;
-import java.util.Map;
-
-import junit.framework.TestCase;
 import junit.framework.Assert;
-
 import org.apache.commons.javaflow.testcode.Calculator;
 import org.apache.commons.javaflow.testcode.Counter;
 import org.apache.commons.javaflow.testcode.NewObject;
-import org.apache.commons.javaflow.utils.ReflectionUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -42,13 +36,13 @@
         
         Continuation continuation = null;
 
-        TestCase.assertTrue(
+        assertTrue(
                 Calculator.global == 0 &&
                 Calculator.local == 0
                 );                
 
         continuation = Continuation.startWith(new Calculator());
-        TestCase.assertTrue(
+        assertTrue(
                 Calculator.global == 1 &&
                 Calculator.local == 1
                 );                
@@ -56,13 +50,13 @@
         final Continuation parent = continuation;
 
         final Continuation continuation11 = Continuation.continueWith(parent);
-        TestCase.assertTrue(
+        assertTrue(
                 Calculator.global == 2 &&
                 Calculator.local == 2
                 );                
         
         final Continuation continuation12 = Continuation.continueWith(parent);
-        TestCase.assertTrue(
+        assertTrue(
                 Calculator.global == 3 &&
                 Calculator.local == 2
                 );                
@@ -80,11 +74,11 @@
             c.run();
         } catch (final Exception e) {
             log.debug("Catching a " + e);
-            TestCase.assertTrue(e instanceof IllegalStateException);
+            assertTrue(e instanceof IllegalStateException);
             exceptionThrown = true;
         }
         
-        TestCase.assertTrue(exceptionThrown);
+        assertTrue(exceptionThrown);
     }
 
     public void testCounter() throws Exception {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message