commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r666239 - /commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/TestConstant.java
Date Tue, 10 Jun 2008 17:59:33 GMT
Author: mbenson
Date: Tue Jun 10 10:59:33 2008
New Revision: 666239

URL: http://svn.apache.org/viewvc?rev=666239&view=rev
Log:
unchecked

Modified:
    commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/TestConstant.java

Modified: commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/TestConstant.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/TestConstant.java?rev=666239&r1=666238&r2=666239&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/TestConstant.java
(original)
+++ commons/sandbox/functor/trunk/src/test/java/org/apache/commons/functor/core/TestConstant.java
Tue Jun 10 10:59:33 2008
@@ -42,7 +42,7 @@
     // ------------------------------------------------------------------------
 
     protected Object makeFunctor() {
-        return new Constant("K");
+        return new Constant<Object>("K");
     }
 
     // Lifecycle
@@ -60,7 +60,7 @@
     // ------------------------------------------------------------------------
 
     public void testEvaluate() throws Exception {
-        Constant f = new Constant("xyzzy");
+        Constant<Object> f = new Constant<Object>("xyzzy");
         assertEquals("xyzzy",f.evaluate());
         assertEquals("xyzzy",f.evaluate(null));
         assertEquals("xyzzy",f.evaluate(null,null));
@@ -70,7 +70,7 @@
     }
 
     public void testEvaluateConstantNull() throws Exception {
-        Constant f = new Constant(null);
+        Constant<Object> f = new Constant<Object>(null);
         assertNull(f.evaluate());
         assertNull(f.evaluate(null));
         assertNull(f.evaluate(null,null));
@@ -80,7 +80,7 @@
     }
 
     public void testConstantTrue() throws Exception {
-        Constant truePred = new Constant(true);
+        Constant<Object> truePred = new Constant<Object>(true);
         assertTrue(truePred.test());
         assertTrue(truePred.test(null));
         assertTrue(truePred.test(null,null));
@@ -91,7 +91,7 @@
     }
 
     public void testConstantFalse() throws Exception {
-        Constant falsePred = new Constant(false);
+        Constant<Object> falsePred = new Constant<Object>(false);
         assertTrue(!falsePred.test());
         assertTrue(!falsePred.test(null));
         assertTrue(!falsePred.test(null,null));
@@ -102,28 +102,28 @@
     }
 
     public void testEquals() throws Exception {
-        Constant f = new Constant("xyzzy");
+        Constant<Object> f = new Constant<Object>("xyzzy");
         assertEquals(f,f);
 
-        assertObjectsAreEqual(f,new Constant("xyzzy"));
-        assertObjectsAreNotEqual(f,new Constant("abcde"));
-        assertObjectsAreNotEqual(f,new Constant(null));
+        assertObjectsAreEqual(f,new Constant<Object>("xyzzy"));
+        assertObjectsAreNotEqual(f,new Constant<Object>("abcde"));
+        assertObjectsAreNotEqual(f,new Constant<Object>(null));
     }
 
     public void testConstants() throws Exception {
-        assertEquals(Constant.predicate(true),Constant.of(Boolean.TRUE));
+        assertEquals(Constant.predicate(true),Constant.TRUE);
 
-        assertEquals(Constant.truePredicate(),Constant.truePredicate());
-        assertSame(Constant.truePredicate(),Constant.truePredicate());
+        assertEquals(Constant.truePredicate(),Constant.TRUE);
+        assertSame(Constant.truePredicate(),Constant.TRUE);
 
-        assertEquals(Constant.predicate(true),Constant.truePredicate());
-        assertSame(Constant.predicate(true),Constant.truePredicate());
+        assertEquals(Constant.predicate(true),Constant.TRUE);
+        assertSame(Constant.predicate(true),Constant.TRUE);
 
-        assertEquals(Constant.falsePredicate(),Constant.falsePredicate());
-        assertSame(Constant.falsePredicate(),Constant.falsePredicate());
+        assertEquals(Constant.falsePredicate(),Constant.FALSE);
+        assertSame(Constant.falsePredicate(),Constant.FALSE);
 
-        assertEquals(Constant.predicate(false),Constant.falsePredicate());
-        assertSame(Constant.predicate(false),Constant.falsePredicate());
+        assertEquals(Constant.predicate(false),Constant.FALSE);
+        assertSame(Constant.predicate(false),Constant.FALSE);
     }
 
 



Mime
View raw message