commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1051300 - /commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
Date Mon, 20 Dec 2010 22:05:42 GMT
Author: sebb
Date: Mon Dec 20 22:05:42 2010
New Revision: 1051300

URL: http://svn.apache.org/viewvc?rev=1051300&view=rev
Log:
Add some IAE tests for null ctor parameters

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java?rev=1051300&r1=1051299&r2=1051300&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPool.java
Mon Dec 20 22:05:42 2010
@@ -174,6 +174,23 @@ public class TestStackObjectPool extends
         }
     }
     
+    @Test(expected=IllegalArgumentException.class)
+    public void testNullFactory1(){
+        new StackObjectPool<Integer>(null);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testNullFactory2(){
+        new StackObjectPool<Integer>(null, null);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testNullFactory3(){
+        PoolableObjectFactory<Integer> factory = new SelectiveFactory();
+        new StackObjectPool<Integer>(factory, null);
+    }
+
+    /**
     /**
      * Verify that out of range constructor arguments are ignored.
      */



Mime
View raw message