45d862b9c655542aa44c02958011065f6994f512Trond Norbye * CDDL HEADER START
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * The contents of this file are subject to the terms of the
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * Common Development and Distribution License (the "License").
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * You may not use this file except in compliance with the License.
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * See LICENSE.txt included in this distribution for the specific
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * language governing permissions and limitations under the License.
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * When distributing Covered Code, include this CDDL HEADER in each
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * file and include the License file at LICENSE.txt.
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * If applicable, add the following below this CDDL HEADER, with the
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * fields enclosed by brackets "[]" replaced with your own identifying
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * information: Portions Copyright [yyyy] [name of copyright owner]
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * CDDL HEADER END
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * Use is subject to license terms.
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * Check the CommandLineOption class
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * @author Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbye public static void setUpClass() throws Exception {
45d862b9c655542aa44c02958011065f6994f512Trond Norbye public static void tearDownClass() throws Exception {
45d862b9c655542aa44c02958011065f6994f512Trond Norbye * Test of getCommandString method, of class CommandLineOptions.
a937449043f1e649320ccb609d9d1de16f6a9208Knut Anders Hatlen public void testCommandLineOptions() throws IOException {
45d862b9c655542aa44c02958011065f6994f512Trond Norbye CommandLineOptions instance = new CommandLineOptions();
45d862b9c655542aa44c02958011065f6994f512Trond Norbye String cmdString = instance.getCommandString();
45d862b9c655542aa44c02958011065f6994f512Trond Norbye if (c != ':') {
45d862b9c655542aa44c02958011065f6994f512Trond Norbye Iterator<CommandLineOptions.Option> iter = instance.getOptionsIterator();
654c8ccb7fb16112a271048b7ee2d6f46cd746d6Trond Norbye CommandLineOptions instance = new CommandLineOptions();
654c8ccb7fb16112a271048b7ee2d6f46cd746d6Trond Norbye String cmdString = instance.getCommandString();
654c8ccb7fb16112a271048b7ee2d6f46cd746d6Trond Norbye assertEquals("-?\n\tHelp", instance.getCommandUsage('?'));
f0ca07e08967a974684daffd32316cc9f9b98150Trond Norbye CommandLineOptions instance = new CommandLineOptions();
f0ca07e08967a974684daffd32316cc9f9b98150Trond Norbye String cmdString = instance.getCommandString();
f0ca07e08967a974684daffd32316cc9f9b98150Trond Norbye assertEquals("-V\n\tPrint version and quit", instance.getCommandUsage('V'));