You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2012/07/25 00:15:31 UTC
svn commit: r1365326 - in
/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core:
TestLeftIdentity.java TestRightIdentity.java
Author: kinow
Date: Tue Jul 24 22:15:31 2012
New Revision: 1365326
URL: http://svn.apache.org/viewvc?rev=1365326&view=rev
Log:
Added tests to LeftIdentity and RightIdentity no args constructors (created for compatibility with tools using JavaBeans).
Modified:
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestLeftIdentity.java
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestRightIdentity.java
Modified: commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestLeftIdentity.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestLeftIdentity.java?rev=1365326&r1=1365325&r2=1365326&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestLeftIdentity.java (original)
+++ commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestLeftIdentity.java Tue Jul 24 22:15:31 2012
@@ -17,6 +17,7 @@
package org.apache.commons.functor.core;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -43,6 +44,11 @@ public class TestLeftIdentity extends Ba
// ------------------------------------------------------------------------
@Test
+ public void testJavabeanConstructor() {
+ assertNotNull(new LeftIdentity()); // Public constructor for JavaBean
+ }
+
+ @Test
public void testEvaluate() throws Exception {
BinaryFunction<Object, Object, Object> f = LeftIdentity.FUNCTION;
assertNull(f.evaluate(null,null));
Modified: commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestRightIdentity.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestRightIdentity.java?rev=1365326&r1=1365325&r2=1365326&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestRightIdentity.java (original)
+++ commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/TestRightIdentity.java Tue Jul 24 22:15:31 2012
@@ -17,6 +17,7 @@
package org.apache.commons.functor.core;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -43,6 +44,11 @@ public class TestRightIdentity extends B
// ------------------------------------------------------------------------
@Test
+ public void testJavabeanConstructor() {
+ assertNotNull(new RightIdentity()); // Public constructor for JavaBean
+ }
+
+ @Test
public void testEvaluate() throws Exception {
BinaryFunction<Object, Object, Object> f = RightIdentity.FUNCTION;
assertNull(f.evaluate(null,null));