1 19 package org.netbeans.jmi.javamodel.getters; 20 21 import java.util.Iterator ; 22 import java.util.LinkedList ; 23 import junit.textui.TestRunner; 24 import org.netbeans.api.java.classpath.ClassPath; 25 import org.netbeans.jmi.javamodel.codegen.Utility; 26 import org.netbeans.junit.NbTestCase; 27 import org.netbeans.jmi.javamodel.JavaClass; 28 import org.netbeans.jmi.javamodel.Method; 29 import org.netbeans.junit.NbTestSuite; 30 31 import org.netbeans.modules.javacore.internalapi.JavaMetamodel; 32 33 public class DeprecatedTest extends NbTestCase { 34 35 public DeprecatedTest() { 36 super("DeprecatedTest"); 37 } 38 39 public static NbTestSuite suite() { 40 NbTestSuite suite = new NbTestSuite(DeprecatedTest.class); 41 return suite; 42 } 43 44 45 public static void main(java.lang.String [] args) { 46 TestRunner.run(suite()); 47 } 48 49 public void test() { 50 System.err.println("DeprecatedTest started"); 51 JavaClass jc = Utility.findClass("java.lang.Thread"); 52 Method stopMethod = jc.getMethod("stop", new LinkedList (), false); 53 if (!stopMethod.isDeprecated()) 54 fail(); 55 } 56 57 } 58 | Popular Tags |