1 package org.hanseltest; 2 3 import junit.framework.TestCase; 4 import junit.framework.TestResult; 5 6 import org.hansel.CoverageDecorator; 7 import org.hansel.Util; 8 9 15 public class TestBug582985 extends TestCase { 16 17 20 public void testBug582985() { 21 CoverageDecorator cover = 22 new CoverageDecorator(new Class [] { CoverMe.class, 23 CoverMe2.class }); 24 25 cover.addTestSuite(CoverMeTest.class); 26 cover.addTestSuite(CoverMeTest2.class); 27 28 TestResult result = new TestResult(); 29 30 cover.run(result); 31 32 Util.dumpResult(result); 33 assertEquals(0, result.failureCount()); 34 } 35 36 40 public static class CoverMe { 41 42 private String name = null; 43 44 48 public CoverMe(String aName) { 49 name = aName; 50 } 51 } 52 53 58 public static class CoverMeTest extends TestCase { 59 63 public CoverMeTest(String name) { 64 super(name); 65 } 66 67 68 public void testConstructor() { 69 CoverMe covered = new CoverMe("please"); 70 } 71 } 72 73 76 public static class CoverMe2 { 77 78 private String name = null; 79 80 84 public CoverMe2(String aName) { 85 name = aName; 86 } 87 } 88 89 92 public static class CoverMeTest2 extends TestCase { 93 94 98 public CoverMeTest2(String name) { 99 super(name); 100 } 101 102 103 public void testConstructor() { 104 CoverMe2 covered = new CoverMe2("please"); 105 } 106 } 107 } 108 | Popular Tags |