net.sf.saffron.util
Class OptionsListTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--net.sf.saffron.util.OptionsListTest
All Implemented Interfaces:
Test

public class OptionsListTest
extends TestCase

Unit test for OptionsList.

Since:
Sep 4, 2003
Version:
$Id: //open/saffron/src/net/sf/saffron/util/OptionsList.java#1 $
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
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
OptionsListTest()
           
 
Method Summary
private  void assertContains(String expected, String actual)
           
private  void checkIt(String expected, OptionsList.Option[] options, String[] args)
           
 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()
           
 
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
 
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()

assertContains

private void assertContains(String expected,
                            String actual)

checkIt

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

SourceForge.net_Logo