creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1375144 - /creadur/whisker/trunk/apache-whisker-cli/src/test/java/org/apache/creadur/whisker/cli/TestCommandParsing.java
Date Mon, 20 Aug 2012 17:54:56 GMT
Author: rdonkin
Date: Mon Aug 20 17:54:56 2012
New Revision: 1375144

URL: http://svn.apache.org/viewvc?rev=1375144&view=rev
Log:
Test exclusivity

Modified:
    creadur/whisker/trunk/apache-whisker-cli/src/test/java/org/apache/creadur/whisker/cli/TestCommandParsing.java

Modified: creadur/whisker/trunk/apache-whisker-cli/src/test/java/org/apache/creadur/whisker/cli/TestCommandParsing.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-cli/src/test/java/org/apache/creadur/whisker/cli/TestCommandParsing.java?rev=1375144&r1=1375143&r2=1375144&view=diff
==============================================================================
--- creadur/whisker/trunk/apache-whisker-cli/src/test/java/org/apache/creadur/whisker/cli/TestCommandParsing.java
(original)
+++ creadur/whisker/trunk/apache-whisker-cli/src/test/java/org/apache/creadur/whisker/cli/TestCommandParsing.java
Mon Aug 20 17:54:56 2012
@@ -59,6 +59,33 @@ public class TestCommandParsing extends 
         }
     }
 
+    public void testGenerateAndSkeletonAreMutuallyExclusive() throws Exception {
+        try {
+            subject.configure(
+                args(longOpt(CommandLineOption.LICENSE_DESCRIPTION.getLongName()), "PATH",
+                        longOpt(CommandLineOption.ACT_TO_SKELETON.getLongName()),
+                        longOpt(CommandLineOption.ACT_TO_GENERATE.getLongName())));
+
+            fail("Expected audit and generate to together to throw exception");
+        } catch (AlreadySelectedException e) {
+            // expected
+        }
+    }
+
+    public void testSkeletonAndAuditAreMutuallyExclusive() throws Exception {
+        try {
+            subject.configure(
+                args(longOpt(CommandLineOption.LICENSE_DESCRIPTION.getLongName()), "PATH",
+                        longOpt(CommandLineOption.ACT_TO_AUDIT.getLongName()),
+                        longOpt(CommandLineOption.ACT_TO_SKELETON.getLongName())));
+
+            fail("Expected audit and generate to together to throw exception");
+        } catch (AlreadySelectedException e) {
+            // expected
+        }
+    }
+
+
     public void testSetGenerateAct() throws Exception {
         checkSetActForOption(Act.GENERATE, CommandLineOption.ACT_TO_GENERATE);
     }



Mime
View raw message