1 19 package org.netbeans.jmi.javamodel; 20 21 import java.util.HashMap ; 22 import java.util.Iterator ; 23 import junit.textui.TestRunner; 24 import org.netbeans.junit.NbTestCase; 25 import org.netbeans.junit.NbTestSuite; 26 27 28 public class FeaturesTest extends NbTestCase { 29 30 31 public FeaturesTest(String name) { 32 super(name); 33 34 } 35 36 public static NbTestSuite suite() { 37 NbTestSuite suite = new NbTestSuite(); 38 suite.addTest(new FeaturesTest("testAllFeatures")); 39 return suite; 40 } 41 42 43 public static void main(java.lang.String [] args) { 44 TestRunner.run(suite()); 45 } 46 47 String cbn; 48 HashMap classes; 49 int numOfFeaturesInClasses; 50 51 protected void setUp() { 52 54 cbn = "testsrc"; 55 56 classes = new HashMap (); 57 classes.put("junit.framework.Assert", new Integer (39)); 58 classes.put("junit.framework.AssertionFailedError", new Integer (2)); 59 classes.put("junit.framework.ComparisonFailure", new Integer (4)); 60 classes.put("junit.framework.Protectable", new Integer (1)); 61 classes.put("junit.framework.Test", new Integer (2)); 62 classes.put("junit.framework.TestCase", new Integer (14)); 63 classes.put("junit.framework.TestFailure", new Integer (9)); 64 classes.put("junit.framework.TestListener", new Integer (4)); 65 classes.put("junit.framework.TestResult", new Integer (23)); 66 classes.put("junit.framework.TestSuite", new Integer (24)); 67 68 numOfFeaturesInClasses = classes.size(); 69 for (Iterator it = classes.values().iterator(); it.hasNext(); ) { 70 numOfFeaturesInClasses += ((Integer )it.next()).intValue(); 71 } 72 } 73 74 75 public void testAllFeatures() { 122 } 123 124 } 125 | Popular Tags |