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 junit.framework.TestCase;
09:
10: /**
11: * @author <a href="mailto:pholser@thoughtworks.com">Paul Holser</a>
12: * @version $Id: ShouldNotInstantiateUtilityClassesTest.java,v 1.6 2007/04/10 20:06:27 pholser Exp $
13: */
14: public class ShouldNotInstantiateUtilityClassesTest extends TestCase {
15: public void testParserRules() {
16: try {
17: new ParserRules();
18: fail();
19: } catch (UnsupportedOperationException expected) {
20: assertTrue(expected.getMessage(), true);
21: }
22: }
23:
24: public void testReflection() {
25: try {
26: new Reflection();
27: fail();
28: } catch (UnsupportedOperationException expected) {
29: assertTrue(expected.getMessage(), true);
30: }
31: }
32: }
|