/[Apache-SVN]/jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/option/CommandTest.java
ViewVC logotype

Diff of /jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/option/CommandTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/option/CommandTest.java	2005/06/03 21:14:45	179891
+++ jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli2/option/CommandTest.java	2005/06/03 21:15:13	179892
@@ -1,5 +1,5 @@
 /**
- * Copyright 2003-2004 The Apache Software Foundation
+ * Copyright 2003-2005 The Apache Software Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ import org.apache.commons.cli2.Option;
 import org.apache.commons.cli2.OptionException;
 import org.apache.commons.cli2.Parent;
 import org.apache.commons.cli2.WriteableCommandLine;
+import org.apache.commons.cli2.commandline.WriteableCommandLineImpl;
 
 /**
  * @author Rob Oxspring
@@ -107,15 +108,18 @@ public class CommandTest extends ParentT
      * @see org.apache.commons.cli2.OptionTestCase#testCanProcess()
      */
     public void testCanProcess() {
-        assertTrue(buildStartCommand().canProcess("start"));
+        final Command option = buildStartCommand();
+        assertTrue(option.canProcess(new WriteableCommandLineImpl(option,null), "start"));
     }
 
     public void testCanProcess_BadMatch() {
-        assertFalse(buildStartCommand().canProcess("stop"));
+        final Command option = buildStartCommand();
+        assertFalse(option.canProcess(new WriteableCommandLineImpl(option,null), "stop"));
     }
 
     public void testCanProcess_Alias() {
-        assertTrue(buildStartCommand().canProcess("go"));
+        final Command option = buildStartCommand();
+        assertTrue(option.canProcess(new WriteableCommandLineImpl(option,null), "go"));
     }
 
     /*

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26