01: package org.hanseltest;
02:
03: import junit.framework.Test;
04: import junit.framework.TestCase;
05: import junit.framework.TestSuite;
06:
07: import org.hansel.CoverageDecorator;
08:
09: /**
10: * Test for Bug589205. When two CoverageTests were added to a TestSuite, the
11: * coverage tests failed.
12: *
13: * @author Niklas Mehner
14: */
15: public class TestBug589205 extends TestCase {
16:
17: /**
18: * Creates a new Test.
19: * @param name Name of the test.
20: */
21: public TestBug589205(String name) {
22: super (name);
23: }
24:
25: /**
26: * Static method to create the TestSuit.
27: * This wrapps the test in a CoverageDecorator.
28: * @return TestSuit for this class.
29: */
30: public static Test suite() {
31: TestSuite suite = new TestSuite();
32: suite.addTest(new CoverageDecorator(TestBug589205.class,
33: new Class[] { Example.class }));
34: suite.addTest(new CoverageDecorator(TestBug589205.class,
35: new Class[] { Example.class }));
36:
37: return suite;
38: }
39:
40: /** Tests the Example class. */
41: public void testClass() {
42: Example example = new Example();
43: }
44:
45: /** Empty class. */
46: public static class Example {
47:
48: }
49: }
|