commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1171255 [4/5] - in /commons/sandbox/functor/trunk: ./ src/test/java/org/apache/commons/functor/ src/test/java/org/apache/commons/functor/adapter/ src/test/java/org/apache/commons/functor/core/ src/test/java/org/apache/commons/functor/core/...
Date Thu, 15 Sep 2011 20:27:43 GMT
Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinarySequence.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinarySequence.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinarySequence.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestBinarySequence.java Thu Sep 15 20:27:39 2011
@@ -16,15 +16,15 @@
  */
 package org.apache.commons.functor.core.composite;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.BinaryProcedure;
 import org.apache.commons.functor.core.NoOp;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -33,17 +33,6 @@ import org.apache.commons.functor.core.N
 @SuppressWarnings("unchecked")
 public class TestBinarySequence extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestBinarySequence(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestBinarySequence.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -51,26 +40,17 @@ public class TestBinarySequence extends 
         return new BinarySequence(new NoOp(),new NoOp());
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testRunZero() throws Exception {
         BinarySequence seq = new BinarySequence();
         seq.run(null,null);
         seq.run("xyzzy","xyzzy");
     }
 
+    @Test
     public void testRunOne() throws Exception {
         RunCounter counter = new RunCounter();
         BinarySequence seq = new BinarySequence(counter);
@@ -81,6 +61,7 @@ public class TestBinarySequence extends 
         assertEquals(2,counter.count);
     }
 
+    @Test
     public void testRunTwo() throws Exception {
         RunCounter[] counter = { new RunCounter(), new RunCounter() };
         BinarySequence seq = new BinarySequence(counter[0],counter[1]);
@@ -94,6 +75,7 @@ public class TestBinarySequence extends 
         assertEquals(2,counter[1].count);
     }
 
+    @Test
     public void testThen() throws Exception {
         List list = new ArrayList();
         BinarySequence seq = new BinarySequence();
@@ -109,6 +91,7 @@ public class TestBinarySequence extends 
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         BinarySequence p = new BinarySequence();
         assertEquals(p,p);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestComposite.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestComposite.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestComposite.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestComposite.java Thu Sep 15 20:27:39 2011
@@ -16,45 +16,36 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertNotNull;
 
 import org.apache.commons.functor.core.Identity;
 import org.apache.commons.functor.core.LeftIdentity;
 import org.apache.commons.functor.core.NoOp;
 import org.apache.commons.functor.core.comparator.IsGreaterThan;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
  * @author Rodney Waldhoff
  */
-public class TestComposite extends TestCase {
-
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestComposite(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestComposite.class);
-    }
+public class TestComposite {
 
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testHasNoArgConstructor() throws Exception {
         assertNotNull(new Composite());
     }
 
+    @Test
     public void testUnaryMethods() {
         assertNotNull(Composite.procedure(NoOp.instance(),Identity.instance()));
         assertNotNull(Composite.predicate(Identity.instance(),Identity.instance()));
         assertNotNull(Composite.function(Identity.instance(),Identity.instance()));
     }
 
+    @Test
     public void testBinaryMethods() {
         assertNotNull(Composite.function(LeftIdentity.function(),LeftIdentity.function(),LeftIdentity.function()));
         assertNotNull(Composite.predicate(IsGreaterThan.instance(),new Identity<Comparable<?>>(),new Identity<Comparable<?>>()));

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryFunction.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryFunction.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryFunction.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,12 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.UnaryFunction;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +29,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestCompositeUnaryFunction extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestCompositeUnaryFunction(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestCompositeUnaryFunction.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -47,20 +36,10 @@ public class TestCompositeUnaryFunction 
         return Composite.function(Constant.of(3));
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
 
         assertEquals(new Integer(4),(new CompositeUnaryFunction<Object, Integer>(Constant.of(4))).evaluate(null));
@@ -69,6 +48,7 @@ public class TestCompositeUnaryFunction 
         assertEquals(new Integer(3),(new CompositeUnaryFunction<Object, Integer>(Constant.of(3)).of(Constant.of(4)).evaluate("xyzzy")));
     }
 
+    @Test
     public void testOf() throws Exception {
         UnaryFunction<Object, Integer> uf = new UnaryFunction<Object, Integer>() {
             public Integer evaluate(Object obj) {
@@ -86,6 +66,7 @@ public class TestCompositeUnaryFunction 
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         CompositeUnaryFunction<Object, String> f = new CompositeUnaryFunction<Object, String>(Constant.of("x"));
         assertEquals(f,f);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryPredicate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryPredicate.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryPredicate.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryPredicate.java Thu Sep 15 20:27:39 2011
@@ -16,11 +16,14 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -28,17 +31,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestCompositeUnaryPredicate extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestCompositeUnaryPredicate(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestCompositeUnaryPredicate.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -46,26 +38,17 @@ public class TestCompositeUnaryPredicate
         return Composite.predicate(Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTest() throws Exception {
         assertTrue(Composite.predicate(Constant.TRUE).test(null));
         assertTrue(Composite.predicate(Constant.TRUE, Constant.of(3)).test("xyzzy"));
         assertFalse(Composite.predicate(Constant.FALSE, Constant.of(4)).test("xyzzy"));
     }
 
+    @Test
     @SuppressWarnings("unchecked")
     public void testNullNotAllowed() throws Exception {
         try {
@@ -82,6 +65,7 @@ public class TestCompositeUnaryPredicate
         }
     }
 
+    @Test
     public void testOf() throws Exception {
         CompositeUnaryPredicate<Object> f = new CompositeUnaryPredicate<Object>(Constant.TRUE);
         assertTrue(f.test(null));
@@ -91,6 +75,7 @@ public class TestCompositeUnaryPredicate
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         CompositeUnaryPredicate<Object> f = new CompositeUnaryPredicate<Object>(Constant.TRUE);
         assertEquals(f,f);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryProcedure.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestCompositeUnaryProcedure.java Thu Sep 15 20:27:39 2011
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
@@ -30,17 +30,6 @@ import org.apache.commons.functor.core.N
  */
 public class TestCompositeUnaryProcedure extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestCompositeUnaryProcedure(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestCompositeUnaryProcedure.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -48,17 +37,6 @@ public class TestCompositeUnaryProcedure
         return Composite.procedure(NoOp.instance(), Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditional.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditional.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditional.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditional.java Thu Sep 15 20:27:39 2011
@@ -16,9 +16,7 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertNotNull;
 
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.Identity;
@@ -26,37 +24,30 @@ import org.apache.commons.functor.core.I
 import org.apache.commons.functor.core.NoOp;
 import org.apache.commons.functor.core.comparator.IsGreaterThan;
 import org.apache.commons.functor.core.comparator.Max;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
  * @author Rodney Waldhoff
  */
-public class TestConditional extends TestCase {
-
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditional(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditional.class);
-    }
+public class TestConditional {
 
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testHasNoArgConstructor() throws Exception {
         assertNotNull(new Conditional());
     }
 
+    @Test
     public void testUnaryMethods() {
         assertNotNull(Conditional.procedure(IsNull.instance(),NoOp.instance(),NoOp.instance()));
         assertNotNull(Conditional.function(IsNull.instance(),Identity.instance(),Identity.instance()));
         assertNotNull(Conditional.predicate(IsNull.instance(),Constant.truePredicate(),Constant.truePredicate()));
     }
 
+    @Test
     public void testBinaryMethods() {
         assertNotNull(Conditional.procedure(IsGreaterThan.instance(),NoOp.instance(),NoOp.instance()));
         assertNotNull(Conditional.function(IsGreaterThan.instance(),Max.instance(),Max.instance()));

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryFunction.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryFunction.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryFunction.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,12 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.LeftIdentity;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +29,6 @@ import org.apache.commons.functor.core.L
  */
 public class TestConditionalBinaryFunction extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalBinaryFunction(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalBinaryFunction.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -50,20 +39,10 @@ public class TestConditionalBinaryFuncti
             Constant.of("right"));
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         ConditionalBinaryFunction<Boolean, Object, String> f = new ConditionalBinaryFunction<Boolean, Object, String>(
             LeftIdentity.PREDICATE,
@@ -73,6 +52,7 @@ public class TestConditionalBinaryFuncti
         assertEquals("right",f.evaluate(Boolean.FALSE,null));
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalBinaryFunction<Boolean, Object, String> f = new ConditionalBinaryFunction<Boolean, Object, String>(
             LeftIdentity.PREDICATE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryPredicate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryPredicate.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryPredicate.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryPredicate.java Thu Sep 15 20:27:39 2011
@@ -16,11 +16,13 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -28,17 +30,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestConditionalBinaryPredicate extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalBinaryPredicate(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalBinaryPredicate.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -49,20 +40,10 @@ public class TestConditionalBinaryPredic
             Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTest() throws Exception {
         {
             ConditionalBinaryPredicate<Object, Object> p = new ConditionalBinaryPredicate<Object, Object>(
@@ -80,6 +61,7 @@ public class TestConditionalBinaryPredic
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalBinaryPredicate<Object, Object> p = new ConditionalBinaryPredicate<Object, Object>(
             Constant.TRUE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryProcedure.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalBinaryProcedure.java Thu Sep 15 20:27:39 2011
@@ -16,14 +16,14 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.BinaryProcedure;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.LeftIdentity;
 import org.apache.commons.functor.core.NoOp;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -31,17 +31,6 @@ import org.apache.commons.functor.core.N
  */
 public class TestConditionalBinaryProcedure extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalBinaryProcedure(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalBinaryProcedure.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -52,20 +41,10 @@ public class TestConditionalBinaryProced
             NoOp.instance());
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testRun() throws Exception {
         RunCounter left = new RunCounter();
         RunCounter right = new RunCounter();
@@ -86,6 +65,7 @@ public class TestConditionalBinaryProced
         assertEquals(1,right.count);
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalBinaryProcedure<?, ?> p = new ConditionalBinaryProcedure<Boolean, Object>(
             LeftIdentity.PREDICATE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalFunction.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalFunction.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalFunction.java Thu Sep 15 20:27:39 2011
@@ -16,11 +16,11 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -28,17 +28,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestConditionalFunction extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalFunction(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalFunction.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -49,20 +38,10 @@ public class TestConditionalFunction ext
             Constant.of("right"));
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         {
             ConditionalFunction<Object> f = new ConditionalFunction<Object>(
@@ -80,6 +59,7 @@ public class TestConditionalFunction ext
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalFunction<Object> f = new ConditionalFunction<Object>(
             Constant.TRUE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalPredicate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalPredicate.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalPredicate.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalPredicate.java Thu Sep 15 20:27:39 2011
@@ -16,11 +16,12 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -28,17 +29,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestConditionalPredicate extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalPredicate(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalPredicate.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -49,20 +39,10 @@ public class TestConditionalPredicate ex
             Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTest() throws Exception {
         {
             ConditionalPredicate p = new ConditionalPredicate(
@@ -80,6 +60,7 @@ public class TestConditionalPredicate ex
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalPredicate p = new ConditionalPredicate(
             Constant.TRUE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalProcedure.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalProcedure.java Thu Sep 15 20:27:39 2011
@@ -16,13 +16,13 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.Procedure;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.NoOp;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -30,17 +30,6 @@ import org.apache.commons.functor.core.N
  */
 public class TestConditionalProcedure extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalProcedure(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalProcedure.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -51,20 +40,10 @@ public class TestConditionalProcedure ex
             NoOp.INSTANCE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testRun() throws Exception {
         {
             RunCounter left = new RunCounter();
@@ -106,6 +85,7 @@ public class TestConditionalProcedure ex
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalProcedure p = new ConditionalProcedure(
             Constant.FALSE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryFunction.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryFunction.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryFunction.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,12 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.Identity;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +29,6 @@ import org.apache.commons.functor.core.I
  */
 public class TestConditionalUnaryFunction extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalUnaryFunction(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalUnaryFunction.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -50,20 +39,10 @@ public class TestConditionalUnaryFunctio
             Constant.of("right"));
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         ConditionalUnaryFunction<Object, Object> f = new ConditionalUnaryFunction<Object, Object>(
             Identity.INSTANCE,
@@ -73,6 +52,7 @@ public class TestConditionalUnaryFunctio
         assertEquals("right",f.evaluate(Boolean.FALSE));
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalUnaryFunction<Object, Object> f = new ConditionalUnaryFunction<Object, Object>(
             Identity.INSTANCE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryPredicate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryPredicate.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryPredicate.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryPredicate.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,13 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.Identity;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +30,6 @@ import org.apache.commons.functor.core.I
  */
 public class TestConditionalUnaryPredicate extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalUnaryPredicate(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalUnaryPredicate.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -50,20 +40,10 @@ public class TestConditionalUnaryPredica
             Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTest() throws Exception {
         ConditionalUnaryPredicate<Object> p = new ConditionalUnaryPredicate<Object>(
             Identity.INSTANCE,
@@ -73,6 +53,7 @@ public class TestConditionalUnaryPredica
         assertTrue(!p.test(Boolean.FALSE));
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalUnaryPredicate<Object> p = new ConditionalUnaryPredicate<Object>(
             Identity.INSTANCE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryProcedure.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestConditionalUnaryProcedure.java Thu Sep 15 20:27:39 2011
@@ -16,14 +16,14 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.UnaryProcedure;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.Identity;
 import org.apache.commons.functor.core.NoOp;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -31,17 +31,6 @@ import org.apache.commons.functor.core.N
  */
 public class TestConditionalUnaryProcedure extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestConditionalUnaryProcedure(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestConditionalUnaryProcedure.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -52,20 +41,10 @@ public class TestConditionalUnaryProcedu
             NoOp.INSTANCE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testRun() throws Exception {
         RunCounter left = new RunCounter();
         RunCounter right = new RunCounter();
@@ -86,6 +65,7 @@ public class TestConditionalUnaryProcedu
         assertEquals(1,right.count);
     }
 
+    @Test
     public void testEquals() throws Exception {
         ConditionalUnaryProcedure<Object> p = new ConditionalUnaryProcedure<Object>(
             Identity.INSTANCE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestDoWhileProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestDoWhileProcedure.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestDoWhileProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestDoWhileProcedure.java Thu Sep 15 20:27:39 2011
@@ -16,8 +16,11 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.LinkedList;
+import java.util.List;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.Predicate;
@@ -26,9 +29,7 @@ import org.apache.commons.functor.adapte
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.NoOp;
 import org.apache.commons.functor.core.collection.IsEmpty;
-
-import java.util.LinkedList;
-import java.util.List;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -36,17 +37,6 @@ import java.util.List;
  */
 public class TestDoWhileProcedure extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestDoWhileProcedure(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestDoWhileProcedure.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -54,17 +44,6 @@ public class TestDoWhileProcedure extend
         return new DoWhileProcedure(NoOp.INSTANCE, Constant.FALSE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
     public class ListRemoveFirstProcedure implements Procedure {
@@ -92,6 +71,7 @@ public class TestDoWhileProcedure extend
     }
 
 
+    @Test
     public void testLoopWithAction() throws Exception {
         List<Object> list=getList();
 
@@ -122,6 +102,7 @@ public class TestDoWhileProcedure extend
         assertTrue("The list should still contain \"d\"", list.contains("d"));
     }
 
+    @Test
     public void testLoopForNothing() {
         List<Object> list=getList();
         Procedure action=new ListRemoveFirstProcedure(list);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestNot.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestNot.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestNot.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestNot.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,15 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.Predicate;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +32,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestNot extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestNot(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestNot.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -47,25 +39,16 @@ public class TestNot extends BaseFunctor
         return new Not(Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTest() throws Exception {
         Predicate truePred = new Not(Constant.FALSE);
         assertTrue(truePred.test());
     }
 
+    @Test
     public void testEquals() throws Exception {
         Not p = new Not(Constant.TRUE);
         assertEquals(p,p);
@@ -75,10 +58,12 @@ public class TestNot extends BaseFunctor
         assertObjectsAreNotEqual(p,Constant.TRUE);
     }
 
+    @Test
     public void testNotNull() throws Exception {
         assertNull(Not.not(null));
     }
 
+    @Test
     public void testNotNotNull() throws Exception {
         assertNotNull(Not.not(Constant.TRUE));
     }

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestOr.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestOr.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestOr.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestOr.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,14 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.Predicate;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +31,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestOr extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestOr(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestOr.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -47,20 +38,10 @@ public class TestOr extends BaseFunctorT
         return new Or(Constant.FALSE, Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTrue() throws Exception {
         assertTrue((new Or(Constant.TRUE)).test());
         assertTrue((new Or(Constant.FALSE, Constant.TRUE)).test());
@@ -84,6 +65,7 @@ public class TestOr extends BaseFunctorT
         assertTrue(r.test());
     }
 
+    @Test
     public void testFalse() throws Exception {
         assertFalse(new Or().test());
         assertFalse(new Or(Constant.FALSE).test());
@@ -108,6 +90,7 @@ public class TestOr extends BaseFunctorT
         assertTrue(!r.test());
     }
 
+    @Test
     public void testDuplicateAdd() throws Exception {
         Predicate p = Constant.TRUE;
         Or q = new Or(p,p);
@@ -118,6 +101,7 @@ public class TestOr extends BaseFunctorT
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         Or p = new Or();
         assertEquals(p,p);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestSequence.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestSequence.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestSequence.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestSequence.java Thu Sep 15 20:27:39 2011
@@ -16,15 +16,15 @@
  */
 package org.apache.commons.functor.core.composite;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.Procedure;
 import org.apache.commons.functor.core.NoOp;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -33,17 +33,6 @@ import org.apache.commons.functor.core.N
 @SuppressWarnings("unchecked")
 public class TestSequence extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestSequence(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestSequence.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -51,25 +40,16 @@ public class TestSequence extends BaseFu
         return new Sequence(new NoOp(),new NoOp());
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testRunZero() throws Exception {
         Sequence seq = new Sequence();
         seq.run();
     }
 
+    @Test
     public void testRunOne() throws Exception {
         RunCounter counter = new RunCounter();
         Sequence seq = new Sequence(counter);
@@ -78,6 +58,7 @@ public class TestSequence extends BaseFu
         assertEquals(1,counter.count);
     }
 
+    @Test
     public void testRunTwo() throws Exception {
         RunCounter[] counter = { new RunCounter(), new RunCounter() };
         Sequence seq = new Sequence(counter[0],counter[1]);
@@ -88,6 +69,7 @@ public class TestSequence extends BaseFu
         assertEquals(1,counter[1].count);
     }
 
+    @Test
     public void testThen() throws Exception {
         List list = new ArrayList();
         Sequence seq = new Sequence();
@@ -103,6 +85,7 @@ public class TestSequence extends BaseFu
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         Sequence p = new Sequence();
         assertEquals(p,p);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedFunction.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedFunction.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedFunction.java Thu Sep 15 20:27:39 2011
@@ -16,14 +16,16 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.BinaryFunction;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.LeftIdentity;
 import org.apache.commons.functor.core.RightIdentity;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -31,17 +33,6 @@ import org.apache.commons.functor.core.R
  */
 public class TestTransposedFunction extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestTransposedFunction(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestTransposedFunction.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -49,26 +40,17 @@ public class TestTransposedFunction exte
         return new TransposedFunction<Object, Object, Object>(LeftIdentity.FUNCTION);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         BinaryFunction<Object, Object, Object> f = new TransposedFunction<Object, Object, Object>(LeftIdentity.FUNCTION);
         assertEquals("xyzzy",f.evaluate(null,"xyzzy"));
         assertNull(f.evaluate("xyzzy",null));
     }
 
+    @Test
     public void testEquals() throws Exception {
         BinaryFunction<Object, Object, Object> f = new TransposedFunction<Object, Object, Object>(LeftIdentity.FUNCTION);
         assertEquals(f,f);
@@ -77,10 +59,12 @@ public class TestTransposedFunction exte
         assertObjectsAreNotEqual(f,Constant.of("y"));
     }
 
+    @Test
     public void testTransposeNull() throws Exception {
         assertNull(TransposedFunction.transpose(null));
     }
 
+    @Test
     public void testTranspose() throws Exception {
         assertNotNull(TransposedFunction.transpose(Constant.of("x")));
     }

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedPredicate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedPredicate.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedPredicate.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedPredicate.java Thu Sep 15 20:27:39 2011
@@ -16,14 +16,16 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.BinaryPredicate;
 import org.apache.commons.functor.adapter.BinaryFunctionBinaryPredicate;
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.LeftIdentity;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -31,17 +33,6 @@ import org.apache.commons.functor.core.L
  */
 public class TestTransposedPredicate extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestTransposedPredicate(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestTransposedPredicate.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -49,20 +40,10 @@ public class TestTransposedPredicate ext
         return new TransposedPredicate<Object, Object>(Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         BinaryPredicate<Boolean, Boolean> p = new TransposedPredicate<Boolean, Boolean>(BinaryFunctionBinaryPredicate
                 .adapt(LeftIdentity.<Boolean, Boolean> function()));
@@ -70,6 +51,7 @@ public class TestTransposedPredicate ext
         assertEquals(false,p.test(Boolean.TRUE,Boolean.FALSE));
     }
 
+    @Test
     public void testEquals() throws Exception {
         BinaryPredicate<Object, Object> p = new TransposedPredicate<Object, Object>(Constant.TRUE);
         assertEquals(p,p);
@@ -79,10 +61,12 @@ public class TestTransposedPredicate ext
         assertObjectsAreNotEqual(p,Constant.TRUE);
     }
 
+    @Test
     public void testTransposeNull() throws Exception {
         assertNull(TransposedPredicate.transpose(null));
     }
 
+    @Test
     public void testTranspose() throws Exception {
         assertNotNull(TransposedPredicate.transpose(Constant.TRUE));
     }

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedProcedure.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestTransposedProcedure.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,14 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.BinaryProcedure;
 import org.apache.commons.functor.core.NoOp;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +31,6 @@ import org.apache.commons.functor.core.N
  */
 public class TestTransposedProcedure extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestTransposedProcedure(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestTransposedProcedure.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -47,20 +38,10 @@ public class TestTransposedProcedure ext
         return new TransposedProcedure<Object, Object>(NoOp.INSTANCE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         LeftNotNullCounter counter = new LeftNotNullCounter();
         BinaryProcedure<Object, Object> p = new TransposedProcedure<Object, Object>(counter);
@@ -71,6 +52,7 @@ public class TestTransposedProcedure ext
         assertEquals(1,counter.count);
     }
 
+    @Test
     public void testEquals() throws Exception {
         BinaryProcedure<Object, Object> p = new TransposedProcedure<Object, Object>(NoOp.INSTANCE);
         assertEquals(p,p);
@@ -80,10 +62,12 @@ public class TestTransposedProcedure ext
         assertObjectsAreNotEqual(p,NoOp.INSTANCE);
     }
 
+    @Test
     public void testTransposeNull() throws Exception {
         assertNull(TransposedProcedure.transpose(null));
     }
 
+    @Test
     public void testTranspose() throws Exception {
         assertNotNull(TransposedProcedure.transpose(NoOp.INSTANCE));
     }

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryAnd.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryAnd.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryAnd.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryAnd.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,14 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.UnaryPredicate;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +31,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestUnaryAnd extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestUnaryAnd(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestUnaryAnd.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -47,20 +38,10 @@ public class TestUnaryAnd extends BaseFu
         return new UnaryAnd<Object>(Constant.TRUE, Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTrue() throws Exception {
         assertTrue((new UnaryAnd<Object>()).test("xyzzy"));
         assertTrue((new UnaryAnd<Object>(Constant.TRUE)).test("xyzzy"));
@@ -85,6 +66,7 @@ public class TestUnaryAnd extends BaseFu
         assertTrue(r.test("xyzzy"));
     }
 
+    @Test
     public void testFalse() throws Exception {
         assertFalse(new UnaryAnd<Object>(Constant.FALSE).test("xyzzy"));
         assertFalse(new UnaryAnd<Object>(Constant.TRUE,Constant.FALSE).test("xyzzy"));
@@ -108,6 +90,7 @@ public class TestUnaryAnd extends BaseFu
         assertTrue(!r.test("xyzzy"));
     }
 
+    @Test
     public void testDuplicateAdd() throws Exception {
         UnaryPredicate<Object> p = Constant.TRUE;
         UnaryAnd<Object> q = new UnaryAnd<Object>(p,p);
@@ -118,6 +101,7 @@ public class TestUnaryAnd extends BaseFu
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         UnaryAnd<Object> p = new UnaryAnd<Object>();
         assertEquals(p,p);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryFunction.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryFunction.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryFunction.java Thu Sep 15 20:27:39 2011
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.BinaryFunction;
@@ -25,6 +25,7 @@ import org.apache.commons.functor.core.C
 import org.apache.commons.functor.core.Identity;
 import org.apache.commons.functor.core.LeftIdentity;
 import org.apache.commons.functor.core.RightIdentity;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -32,17 +33,6 @@ import org.apache.commons.functor.core.R
  */
 public class TestUnaryCompositeBinaryFunction extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestUnaryCompositeBinaryFunction(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestUnaryCompositeBinaryFunction.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -53,20 +43,10 @@ public class TestUnaryCompositeBinaryFun
             Identity.instance());
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         BinaryFunction<Object, Object, Object> f = new UnaryCompositeBinaryFunction<Object, Object, Object>(
                 RightIdentity.FUNCTION,
@@ -77,6 +57,7 @@ public class TestUnaryCompositeBinaryFun
         assertEquals("right",f.evaluate(null,"right"));
     }
 
+    @Test
     public void testEquals() throws Exception {
         BinaryFunction<Object, Object, Object> f = new UnaryCompositeBinaryFunction<Object, Object, Object>(
                 LeftIdentity.FUNCTION,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryPredicate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryPredicate.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryPredicate.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryCompositeBinaryPredicate.java Thu Sep 15 20:27:39 2011
@@ -16,8 +16,7 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.BinaryPredicate;
@@ -25,6 +24,7 @@ import org.apache.commons.functor.core.C
 import org.apache.commons.functor.core.Identity;
 import org.apache.commons.functor.core.LeftIdentity;
 import org.apache.commons.functor.core.RightIdentity;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -32,17 +32,6 @@ import org.apache.commons.functor.core.R
  */
 public class TestUnaryCompositeBinaryPredicate extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestUnaryCompositeBinaryPredicate(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestUnaryCompositeBinaryPredicate.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -53,20 +42,10 @@ public class TestUnaryCompositeBinaryPre
                 new Identity<Boolean>());
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testEvaluate() throws Exception {
         BinaryPredicate<Boolean, Boolean> f = new UnaryCompositeBinaryPredicate<Boolean, Boolean>(
                 RightIdentity.PREDICATE,
@@ -76,6 +55,7 @@ public class TestUnaryCompositeBinaryPre
         assertEquals(true,f.test(null,Boolean.TRUE));
     }
 
+    @Test
     public void testEquals() throws Exception {
         BinaryPredicate<Boolean, Boolean> f = new UnaryCompositeBinaryPredicate<Boolean, Boolean>(
                 LeftIdentity.PREDICATE,

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryNot.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryNot.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryNot.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryNot.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,15 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.UnaryPredicate;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +32,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestUnaryNot extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestUnaryNot(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestUnaryNot.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -47,20 +39,10 @@ public class TestUnaryNot extends BaseFu
         return new UnaryNot<Object>(Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTest() throws Exception {
         UnaryPredicate<Object> truePred = new UnaryNot<Object>(Constant.FALSE);
         assertTrue(truePred.test(null));
@@ -68,6 +50,7 @@ public class TestUnaryNot extends BaseFu
         assertTrue(truePred.test(new Integer(3)));
     }
 
+    @Test
     public void testEquals() throws Exception {
         UnaryNot<Object> p = new UnaryNot<Object>(Constant.TRUE);
         assertEquals(p,p);
@@ -77,10 +60,12 @@ public class TestUnaryNot extends BaseFu
         assertObjectsAreNotEqual(p,Constant.TRUE);
     }
 
+    @Test
     public void testNotNull() throws Exception {
         assertNull(UnaryNot.not(null));
     }
 
+    @Test
     public void testNotNotNull() throws Exception {
         assertNotNull(UnaryNot.not(Constant.truePredicate()));
     }

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryOr.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryOr.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryOr.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnaryOr.java Thu Sep 15 20:27:39 2011
@@ -16,12 +16,13 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.UnaryPredicate;
 import org.apache.commons.functor.core.Constant;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -29,17 +30,6 @@ import org.apache.commons.functor.core.C
  */
 public class TestUnaryOr extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestUnaryOr(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestUnaryOr.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -47,20 +37,10 @@ public class TestUnaryOr extends BaseFun
         return new UnaryOr<Object>(Constant.FALSE,Constant.TRUE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testTrue() throws Exception {
         assertTrue((new UnaryOr<Object>(Constant.TRUE)).test("xyzzy"));
         assertTrue((new UnaryOr<Object>(Constant.FALSE,Constant.TRUE)).test("xyzzy"));
@@ -84,6 +64,7 @@ public class TestUnaryOr extends BaseFun
         assertTrue(r.test("xyzzy"));
     }
 
+    @Test
     public void testFalse() throws Exception {
         assertTrue(!(new UnaryOr<Object>()).test("xyzzy"));
         assertTrue(!(new UnaryOr<Object>(Constant.FALSE)).test("xyzzy"));
@@ -108,6 +89,7 @@ public class TestUnaryOr extends BaseFun
         assertTrue(!r.test("xyzzy"));
     }
 
+    @Test
     public void testDuplicateAdd() throws Exception {
         UnaryPredicate<Object> p = Constant.TRUE;
         UnaryOr<Object> q = new UnaryOr<Object>(p,p);
@@ -118,6 +100,7 @@ public class TestUnaryOr extends BaseFun
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         UnaryOr<Object> p = new UnaryOr<Object>();
         assertEquals(p,p);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java Thu Sep 15 20:27:39 2011
@@ -16,15 +16,15 @@
  */
 package org.apache.commons.functor.core.composite;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.UnaryProcedure;
 import org.apache.commons.functor.core.NoOp;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -33,17 +33,6 @@ import org.apache.commons.functor.core.N
 @SuppressWarnings("unchecked")
 public class TestUnarySequence extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestUnarySequence(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestUnarySequence.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -51,26 +40,17 @@ public class TestUnarySequence extends B
         return new UnarySequence(new NoOp(),new NoOp());
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
 
+    @Test
     public void testRunZero() throws Exception {
         UnarySequence seq = new UnarySequence();
         seq.run(null);
         seq.run("xyzzy");
     }
 
+    @Test
     public void testRunOne() throws Exception {
         RunCounter counter = new RunCounter();
         UnarySequence seq = new UnarySequence(counter);
@@ -81,6 +61,7 @@ public class TestUnarySequence extends B
         assertEquals(2,counter.count);
     }
 
+    @Test
     public void testRunTwo() throws Exception {
         RunCounter[] counter = { new RunCounter(), new RunCounter() };
         UnarySequence seq = new UnarySequence(counter[0],counter[1]);
@@ -94,6 +75,7 @@ public class TestUnarySequence extends B
         assertEquals(2,counter[1].count);
     }
 
+    @Test
     public void testThen() throws Exception {
         List list = new ArrayList();
         UnarySequence seq = new UnarySequence();
@@ -109,6 +91,7 @@ public class TestUnarySequence extends B
         }
     }
 
+    @Test
     public void testEquals() throws Exception {
         UnarySequence p = new UnarySequence();
         assertEquals(p,p);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestWhileDoProcedure.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestWhileDoProcedure.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestWhileDoProcedure.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestWhileDoProcedure.java Thu Sep 15 20:27:39 2011
@@ -16,8 +16,11 @@
  */
 package org.apache.commons.functor.core.composite;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.LinkedList;
+import java.util.List;
 
 import org.apache.commons.functor.BaseFunctorTest;
 import org.apache.commons.functor.Predicate;
@@ -26,9 +29,7 @@ import org.apache.commons.functor.adapte
 import org.apache.commons.functor.core.Constant;
 import org.apache.commons.functor.core.NoOp;
 import org.apache.commons.functor.core.collection.IsEmpty;
-
-import java.util.LinkedList;
-import java.util.List;
+import org.junit.Test;
 
 /**
  * @version $Revision$ $Date$
@@ -36,17 +37,6 @@ import java.util.List;
  */
 public class TestWhileDoProcedure extends BaseFunctorTest {
 
-    // Conventional
-    // ------------------------------------------------------------------------
-
-    public TestWhileDoProcedure(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(TestWhileDoProcedure.class);
-    }
-
     // Functor Testing Framework
     // ------------------------------------------------------------------------
 
@@ -54,17 +44,6 @@ public class TestWhileDoProcedure extend
         return new WhileDoProcedure(Constant.FALSE, NoOp.INSTANCE);
     }
 
-    // Lifecycle
-    // ------------------------------------------------------------------------
-
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     // Tests
     // ------------------------------------------------------------------------
     public class ListRemoveFirstProcedure implements Procedure {
@@ -92,6 +71,7 @@ public class TestWhileDoProcedure extend
     }
 
 
+    @Test
     public void testLoopWithAction() throws Exception {
         List<Object> list=getList();
 
@@ -122,6 +102,7 @@ public class TestWhileDoProcedure extend
         assertTrue("The list should still contain \"d\"", list.contains("d"));
     }
 
+    @Test
     public void testLoopForNothing() {
         List<Object> list=getList();
         Procedure action=new ListRemoveFirstProcedure(list);

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/FlexiMapExample.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/FlexiMapExample.java?rev=1171255&r1=1171254&r2=1171255&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/FlexiMapExample.java (original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/example/FlexiMapExample.java Thu Sep 15 20:27:39 2011
@@ -16,6 +16,10 @@
  */
 package org.apache.commons.functor.example;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -24,10 +28,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
 import org.apache.commons.functor.BinaryFunction;
 import org.apache.commons.functor.BinaryProcedure;
 import org.apache.commons.functor.Function;
@@ -41,6 +41,7 @@ import org.apache.commons.functor.core.I
 import org.apache.commons.functor.core.IsNull;
 import org.apache.commons.functor.core.RightIdentity;
 import org.apache.commons.functor.core.composite.Conditional;
+import org.junit.Test;
 
 /*
  * ----------------------------------------------------------------------------
@@ -61,15 +62,7 @@ import org.apache.commons.functor.core.c
  * @author Rodney Waldhoff
  */
 @SuppressWarnings("unchecked")
-public class FlexiMapExample extends TestCase {
-
-    public FlexiMapExample(String testName) {
-        super(testName);
-    }
-
-    public static Test suite() {
-        return new TestSuite(FlexiMapExample.class);
-    }
+public class FlexiMapExample {
 
     /*
      * ----------------------------------------------------------------------------
@@ -89,6 +82,7 @@ public class FlexiMapExample extends Tes
     /*
      * The basic Map interface lets one associate keys and values:
      */
+    @Test
     public void testBasicMap() {
         /* (We'll define these make*Map functions below.) */
         Map map = makeBasicMap();
@@ -102,6 +96,7 @@ public class FlexiMapExample extends Tes
      * If there is no value associated with a key,
      * the basic Map will return null for that key:
      */
+    @Test
     public void testBasicMapReturnsNullForMissingKey() {
         Map map = makeBasicMap();
         assertNull( map.get("key") );
@@ -111,6 +106,7 @@ public class FlexiMapExample extends Tes
      * One can also explicitly store a null value for
      * some key:
      */
+    @Test
     public void testBasicMapAllowsNull() {
         Map map = makeBasicMap();
         Object key = "key";
@@ -123,6 +119,7 @@ public class FlexiMapExample extends Tes
      * The basic Map deals with Objects--it can store keys
      * and values of multiple or differing types:
      */
+    @Test
     public void testBasicMapAllowsMultipleTypes() {
         Map map = makeBasicMap();
         map.put("key-1","value-1");
@@ -141,6 +138,7 @@ public class FlexiMapExample extends Tes
      * key will overwrite the first value--the basic Map only
      * stores the most recently put value for each key:
      */
+    @Test
     public void testBasicMapStoresOnlyOneValuePerKey() {
         Map map = makeBasicMap();
 
@@ -158,6 +156,7 @@ public class FlexiMapExample extends Tes
      * One common specialization is to forbid null values,
      * like our old friend Hashtable:
      */
+    @Test
     public void testForbidNull() {
         Map map = makeNullForbiddenMap();
 
@@ -178,6 +177,7 @@ public class FlexiMapExample extends Tes
      * contains a counter--when there's no count yet, we'll
      * want to treat it as zero.):
      */
+    @Test
     public void testNullDefaultsToZero() {
         Map map = makeDefaultValueForNullMap(new Integer(0));
         /*
@@ -195,7 +195,8 @@ public class FlexiMapExample extends Tes
      * Another common specialization is to constrain the type of values
      * that may be stored in the Map:
      */
-	public void testIntegerValuesOnly() {
+    @Test
+    public void testIntegerValuesOnly() {
 		Map map = makeTypeConstrainedMap(Integer.class);
 		map.put("key", new Integer(2));
 		assertEquals( new Integer(2), map.get("key") );
@@ -216,7 +217,8 @@ public class FlexiMapExample extends Tes
      * with a key adds to that collection, rather than overwriting the
      * previous value:
      */
-	public void testMultiMap() {
+    @Test
+    public void testMultiMap() {
 		Map map = makeMultiMap();
 
 		map.put("key", "value 1");
@@ -257,7 +259,8 @@ public class FlexiMapExample extends Tes
      * (Such a Map might be used by the Commons Collection's
      * ExtendedProperties type.):
      */
-	public void testStringConcatMap() {
+    @Test
+    public void testStringConcatMap() {
 		Map map = makeStringConcatMap();
 		map.put("key", "value 1");
 		assertEquals("value 1",map.get("key"));



Mime
View raw message