roxspring 2004/02/17 13:36:39 Modified: cli/src/test/org/apache/commons/cli2/impl Tag: RESEARCH_CLI_2_ROXSPRING GroupTest.java ParentTest.java CommandTest.java DefaultOptionTest.java SwitchTest.java ArgumentTest.java cli/src/test/org/apache/commons/cli2 Tag: RESEARCH_CLI_2_ROXSPRING CommandLineTest.java cli/src/java/org/apache/commons/cli2 Tag: RESEARCH_CLI_2_ROXSPRING CommandLine.java Log: Removed getNormalised() from CommandLine as the contract will make no sense for "default" implementations Revision Changes Path No revision No revision 1.1.2.5 +0 -3 jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/GroupTest.java Index: GroupTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/GroupTest.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- GroupTest.java 8 Feb 2004 13:09:01 -0000 1.1.2.4 +++ GroupTest.java 17 Feb 2004 21:36:38 -0000 1.1.2.5 @@ -178,9 +178,6 @@ assertListContentsEqual( list("compile", "test", "dist"), commandLine.getValues("target")); - assertListContentsEqual( - list("--help", "compile", "test", "dist"), - commandLine.getNormalised()); } public void testProcess_Nested() throws OptionException { 1.1.2.4 +0 -6 jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ParentTest.java Index: ParentTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ParentTest.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- ParentTest.java 8 Feb 2004 12:13:33 -0000 1.1.2.3 +++ ParentTest.java 17 Feb 2004 21:36:38 -0000 1.1.2.4 @@ -128,7 +128,6 @@ assertTrue(commandLine.hasOption(option)); assertTrue(commandLine.hasOption("-k")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(args, commandLine.getNormalised()); } /* (non-Javadoc) @@ -172,7 +171,6 @@ assertTrue(commandLine.hasOption("start")); assertFalse(commandLine.hasOption("stop")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(args, commandLine.getNormalised()); } public void testProcess_Children() throws OptionException { @@ -188,7 +186,6 @@ assertTrue(commandLine.hasOption("start")); assertFalse(commandLine.hasOption("stop")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(args, commandLine.getNormalised()); } public void testProcess_Argument() throws OptionException { @@ -204,9 +201,6 @@ assertContentsEqual( list("C:\\WINDOWS", "C:\\WINNT", "C:\\"), commandLine.getValues(option)); - assertListContentsEqual( - list("--lib", "C:\\WINDOWS", "C:\\WINNT", "C:\\"), - commandLine.getNormalised()); } /* (non-Javadoc) 1.1.2.5 +0 -3 jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/CommandTest.java Index: CommandTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/CommandTest.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- CommandTest.java 8 Feb 2004 13:09:01 -0000 1.1.2.4 +++ CommandTest.java 17 Feb 2004 21:36:38 -0000 1.1.2.5 @@ -85,7 +85,6 @@ assertTrue(commandLine.hasOption("start")); assertTrue(commandLine.hasOption("go")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(list("start"), commandLine.getNormalised()); } public void testProcessParent_Spare() throws OptionException { @@ -100,7 +99,6 @@ assertTrue(commandLine.hasOption(option)); assertTrue(commandLine.hasOption("login")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(args, commandLine.getNormalised()); } /* @@ -146,7 +144,6 @@ assertTrue(commandLine.hasOption(option)); assertTrue(commandLine.hasOption("login")); assertEquals("rob", commandLine.getValue(option)); - assertListContentsEqual(args, commandLine.getNormalised()); } /* 1.1.2.5 +0 -4 jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/DefaultOptionTest.java Index: DefaultOptionTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/DefaultOptionTest.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- DefaultOptionTest.java 8 Feb 2004 13:09:01 -0000 1.1.2.4 +++ DefaultOptionTest.java 17 Feb 2004 21:36:38 -0000 1.1.2.5 @@ -82,7 +82,6 @@ assertTrue(commandLine.hasOption("--help")); assertTrue(commandLine.hasOption("-?")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(list("--help"), commandLine.getNormalised()); } public void testProcessParent_Burst() throws OptionException { @@ -98,9 +97,6 @@ assertTrue(commandLine.hasOption("--help")); assertTrue(commandLine.hasOption("-?")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual( - list("--help", "-elp"), - commandLine.getNormalised()); } /* 1.1.2.5 +0 -2 jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/SwitchTest.java Index: SwitchTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/SwitchTest.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- SwitchTest.java 8 Feb 2004 13:09:01 -0000 1.1.2.4 +++ SwitchTest.java 17 Feb 2004 21:36:38 -0000 1.1.2.5 @@ -68,7 +68,6 @@ assertTrue(commandLine.hasOption("-display")); assertEquals(Boolean.TRUE, commandLine.getSwitch("-d")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(list("+display"), commandLine.getNormalised()); } public void testProcessParent_Disabled() throws OptionException { @@ -84,7 +83,6 @@ assertTrue(commandLine.hasOption("-display")); assertEquals(Boolean.FALSE, commandLine.getSwitch("-d")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(list("-display"), commandLine.getNormalised()); } /* 1.1.2.5 +0 -10 jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ArgumentTest.java Index: ArgumentTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ArgumentTest.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- ArgumentTest.java 8 Feb 2004 13:09:01 -0000 1.1.2.4 +++ ArgumentTest.java 17 Feb 2004 21:36:38 -0000 1.1.2.5 @@ -208,7 +208,6 @@ assertTrue(commandLine.hasOption(option)); assertTrue(commandLine.hasOption("username")); assertEquals("rob", commandLine.getValue(option)); - assertListContentsEqual(args, commandLine.getNormalised()); } public void testProcessValues_SpareValues() throws OptionException { @@ -222,7 +221,6 @@ assertTrue(commandLine.hasOption(option)); assertTrue(commandLine.hasOption("username")); assertEquals("rob", commandLine.getValue(option)); - assertListContentsEqual(args, commandLine.getNormalised()); } public void testProcessValues_Optional() throws OptionException { @@ -245,7 +243,6 @@ assertFalse(commandLine.hasOption(option)); assertFalse(commandLine.hasOption("username")); assertTrue(commandLine.getValues(option).isEmpty()); - assertListContentsEqual(args, commandLine.getNormalised()); } public void testProcessValues_Multiple() throws OptionException { @@ -260,7 +257,6 @@ assertTrue(commandLine.hasOption("target")); assertFalse(commandLine.getValues(option).isEmpty()); assertListContentsEqual(args, commandLine.getValues(option)); - assertListContentsEqual(args, commandLine.getNormalised()); } public void testProcessValues_Contracted() throws OptionException { @@ -276,9 +272,6 @@ assertListContentsEqual( list("compile", "test", "javadoc", "checkstyle", "jdepend"), commandLine.getValues(option)); - assertListContentsEqual( - list("compile", "test", "javadoc", "checkstyle", "jdepend"), - commandLine.getNormalised()); } public void testProcessValues_ContractedTooFew() throws OptionException { @@ -333,9 +326,6 @@ assertListContentsEqual( list("-path=/lib", "/usr/lib", "/usr/local/lib"), commandLine.getValues(option)); - assertListContentsEqual( - list("-path=/lib", "/usr/lib", "/usr/local/lib"), - commandLine.getNormalised()); } /* No revision No revision 1.1.2.7 +0 -15 jakarta-commons/cli/src/test/org/apache/commons/cli2/Attic/CommandLineTest.java Index: CommandLineTest.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/Attic/CommandLineTest.java,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- CommandLineTest.java 8 Feb 2004 13:09:00 -0000 1.1.2.6 +++ CommandLineTest.java 17 Feb 2004 21:36:39 -0000 1.1.2.7 @@ -47,21 +47,6 @@ assertEquals("myval3", commandLine.getProperty("myprop2")); } - public void testNormalised() { - final Option option = new PropertyOption(); - final List args = OptionTestCase.list(); - final CommandLine commandLine = - OptionTestCase.commandLine(option, args); - - try { - commandLine.getNormalised().add("file3"); - fail("Should not be able to add to the list this way"); - } - catch (UnsupportedOperationException uoe) { - // nothing to check - } - } - public void testOptions() { final Option option = new PropertyOption(); final List args = OptionTestCase.list(); No revision No revision 1.1.2.8 +0 -1 jakarta-commons/cli/src/java/org/apache/commons/cli2/Attic/CommandLine.java Index: CommandLine.java =================================================================== RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/Attic/CommandLine.java,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- CommandLine.java 17 Feb 2004 21:14:14 -0000 1.1.2.7 +++ CommandLine.java 17 Feb 2004 21:36:39 -0000 1.1.2.8 @@ -43,7 +43,6 @@ String getProperty(final String property); String getProperty(final String property, final String defaultValue); Set getProperties(); - List getNormalised(); int getOptionCount(final String trigger); int getOptionCount(final Option option); void setDefaultValues(final Option option, final List values);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]