1 9 10 package org.netbeans.modules.editor.impl; 11 12 import java.lang.reflect.Method ; 13 import javax.swing.text.EditorKit ; 14 import org.netbeans.junit.NbTestCase; 15 16 20 public class KitsTrackerTest extends NbTestCase { 21 22 23 public KitsTrackerTest(String name) { 24 super(name); 25 } 26 27 public void testKitsTrackerCallable() throws Exception { 29 Class clazz = getClass().getClassLoader().loadClass("org.netbeans.modules.editor.impl.KitsTracker"); Method getInstanceMethod = clazz.getDeclaredMethod("getInstance"); Method findMimeTypeMethod = clazz.getDeclaredMethod("findMimeType", Class .class); Object kitsTracker = getInstanceMethod.invoke(null); 33 String mimeType = (String ) findMimeTypeMethod.invoke(kitsTracker, EditorKit .class); 34 assertNull("EditorKit.class should not have a mime type", mimeType); 35 } 36 } 37 | Popular Tags |