KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hanseltest > TestBug588661


1 package org.hanseltest;
2
3 import junit.framework.TestCase;
4 import junit.framework.Test;
5
6 import org.hansel.CoverageDecorator;
7
8 /**
9  * This bug caused a java.lang.ClassCircularityError.
10  * This happened when a inner class extended the instrumented outer class.
11  * In that case the ModifyingClassLoader loaded the classes recursively
12  * again :/
13  * @author Niklas Mehner
14  */

15 public class TestBug588661 extends TestCase {
16
17     /**
18      * Create a new Test.
19      * @param name Name of the test.
20      */

21      public TestBug588661(String JavaDoc name) {
22         super(name);
23     }
24
25     /** Cover the class. */
26     public void testSomething() {
27         // This covers both constructors.
28
TestClass588661.cover();
29     }
30     
31     /**
32      * Returns the coverage test suite.
33      * @return Test suite.
34      */

35     public static Test suite() {
36         return new CoverageDecorator(TestBug588661.class,
37                                      new Class JavaDoc[] { TestClass588661.class });
38     }
39 }
40
Popular Tags