KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hanseltest > TestBug589205


1 package org.hanseltest;
2
3 import junit.framework.Test;
4 import junit.framework.TestCase;
5 import junit.framework.TestSuite;
6
7 import org.hansel.CoverageDecorator;
8
9 /**
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 JavaDoc 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 JavaDoc[] { Example.class }));
34         suite.addTest(new CoverageDecorator(TestBug589205.class,
35                                             new Class JavaDoc[] { 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 }
50
Popular Tags