01: /*
02: Copyright 2004-2007 Paul R. Holser, Jr. All rights reserved.
03: Licensed under the Academic Free License version 3.0
04: */
05:
06: package joptsimple;
07:
08: import java.util.Collections;
09:
10: import junit.framework.TestCase;
11:
12: /**
13: * @author <a href="mailto:pholser@alumni.rice.edu">Paul Holser</a>
14: * @version $Id: EmptyOptionSetTest.java,v 1.10 2007/04/10 20:06:27 pholser Exp $
15: */
16: public class EmptyOptionSetTest extends TestCase {
17: private OptionSet empty;
18:
19: protected void setUp() throws Exception {
20: super .setUp();
21:
22: empty = new OptionSet();
23: }
24:
25: public void testArgumentOf() {
26: assertNull(empty.argumentOf("a"));
27: }
28:
29: public void testArgumentsOf() {
30: assertEquals(Collections.EMPTY_LIST, empty.argumentsOf("a"));
31: }
32:
33: public void testHasArgument() {
34: assertFalse(empty.hasArgument("a"));
35: }
36: }
|