1 19 20 package org.netbeans.modules.uihandler; 21 22 import java.util.concurrent.Callable ; 23 import java.util.logging.Handler ; 24 import java.util.logging.Level ; 25 import java.util.logging.Logger ; 26 import org.netbeans.junit.NbTestCase; 27 28 32 public class BugTriggersTest extends NbTestCase { 33 private static Installer o; 34 35 public BugTriggersTest(String testName) { 36 super(testName); 37 } 38 39 protected Level logLevel() { 40 return Level.FINE; 41 } 42 43 protected void setUp() throws Exception { 44 Installer.findObject(Installer.class, true).restored(); 45 } 46 47 protected void tearDown() throws Exception { 48 } 49 50 public void testRootLoggerHasHandler() throws Exception { 51 for (Handler h : Logger.getLogger("").getHandlers()) { 52 if (h instanceof Callable ) { 53 return; 54 } 55 } 56 fail("No handler which implements Callable"); 57 } 58 } 59 | Popular Tags |