org.eigenbase.util
Class OptionsListTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.util.OptionsListTest
All Implemented Interfaces:
Test

public class OptionsListTest
extends TestCase

Unit test for OptionsList.

Since:
Sep 4, 2003
Version:
$Id: //open/dev/farrago/src/org/eigenbase/util/OptionsListTest.java#9 $
Author:
Julian Hyde

Nested Class Summary
private static class OptionsListTest.Color
           
static class OptionsListTest.StringBufferOptionsHandler
          Implementation of OptionsList.OptionHandler which writes to a buffer.
 
Field Summary
private static String NL
           
 
Constructor Summary
OptionsListTest()
           
 
Method Summary
 void _testAnonymousOption()
           
 void _testBooleanArg()
           
 void _testBooleanArgMissing()
           
 void _testEnumeratedArgDefault()
           
 void _testEnumeratedArgLong()
           
 void _testEnumeratedArgShort()
           
 void _testEnumeratedArgWrong()
           
 void _testGroupMissing()
           
 void _testGroupOptionsMustBeOptional()
           
 void _testMissingMandatory()
           
 void _testRepeatingOption()
           
 void _testStringArgSameAsDefault()
           
 void _testStringArgUsesDefaultValue()
           
 void _testUnknownArg()
           
 void _testUnknownArgWithEqualsSyntax()
           
private  void assertContains(String expected, String actual)
           
private  void checkIt(String expected, OptionsList.Option[] options, String[] args)
           
 void testAlwaysSucceeds()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NL

private static final String NL
Constructor Detail

OptionsListTest

public OptionsListTest()
Method Detail

_testBooleanArg

public void _testBooleanArg()

_testBooleanArgMissing

public void _testBooleanArgMissing()

_testUnknownArg

public void _testUnknownArg()

_testUnknownArgWithEqualsSyntax

public void _testUnknownArgWithEqualsSyntax()

_testStringArgSameAsDefault

public void _testStringArgSameAsDefault()

_testStringArgUsesDefaultValue

public void _testStringArgUsesDefaultValue()

_testEnumeratedArgShort

public void _testEnumeratedArgShort()

_testEnumeratedArgLong

public void _testEnumeratedArgLong()

_testEnumeratedArgWrong

public void _testEnumeratedArgWrong()

_testEnumeratedArgDefault

public void _testEnumeratedArgDefault()

_testMissingMandatory

public void _testMissingMandatory()

_testGroupOptionsMustBeOptional

public void _testGroupOptionsMustBeOptional()

_testGroupMissing

public void _testGroupMissing()

_testAnonymousOption

public void _testAnonymousOption()

_testRepeatingOption

public void _testRepeatingOption()

testAlwaysSucceeds

public void testAlwaysSucceeds()

assertContains

private void assertContains(String expected,
                            String actual)

checkIt

private void checkIt(String expected,
                     OptionsList.Option[] options,
                     String[] args)