commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r661612 - /commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/OptionBuilderTest.java
Date Fri, 30 May 2008 09:22:08 GMT
Author: ebourg
Date: Fri May 30 02:22:08 2008
New Revision: 661612

URL: http://svn.apache.org/viewvc?rev=661612&view=rev
Log:
Improved test coverage for OptionBuilder

Modified:
    commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/OptionBuilderTest.java

Modified: commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/OptionBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/OptionBuilderTest.java?rev=661612&r1=661611&r2=661612&view=diff
==============================================================================
--- commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/OptionBuilderTest.java
(original)
+++ commons/proper/cli/branches/cli-1.x/src/test/org/apache/commons/cli/OptionBuilderTest.java
Fri May 30 02:22:08 2008
@@ -135,4 +135,16 @@
             fail( "IllegalArgumentException caught" );
         }
     }
+
+    public void testCreateIncompleteOption() {
+        try
+        {
+            OptionBuilder.hasArg().create();
+            fail("Incomplete option should be rejected");
+        }
+        catch (IllegalArgumentException e)
+        {
+            // expected
+        }
+    }
 }



Mime
View raw message