01: package org.incava.jagol;
02:
03: import java.io.*;
04: import java.util.*;
05: import junit.framework.TestCase;
06:
07: public class TestOption extends TestCase {
08: public TestOption(String name) {
09: super (name);
10: }
11:
12: public void testDefault() {
13: Option opt = new Option("name",
14: "this is the description of name") {
15: public boolean set(String arg, List args)
16: throws OptionException {
17: return false;
18: }
19:
20: public void setValue(String value)
21: throws InvalidTypeException {
22: }
23: };
24: assertEquals("name", opt.getLongName());
25: assertEquals("this is the description of name", opt
26: .getDescription());
27:
28: opt.setShortName('n');
29: assertEquals('n', opt.getShortName());
30: }
31:
32: }
|