|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun * Microsystems, Inc. All Rights Reserved. */ package org.openide; import java.awt.datatransfer.Clipboard; import javax.swing.text.Keymap; import junit.framework.*; import org.netbeans.junit.*; import org.openide.actions.ActionManager; import org.openide.filesystems.Repository; import org.openide.loaders.DataLoaderPool; import org.openide.nodes.NodeOperation; import org.openide.util.Lookup; import org.openide.util.datatransfer.ExClipboard; import org.openide.windows.IOProvider; import org.openide.windows.WindowManager; /** Test for basic stuff (orig. TopManager) being in lookup. * * @author Jaroslav Tulach, Jesse Glick */ public class TopManagerTest extends NbTestCase { /* static { System.setProperty("org.openide.util.MetaInfServicesLookup.DEBUG", "true"); } */ public TopManagerTest(java.lang.String testName) { super(testName); } public static void main(java.lang.String[] args) { junit.textui.TestRunner.run(suite()); } public static Test suite() { TestSuite suite = new NbTestSuite(TopManagerTest.class); return suite; } public void testLoaderPoolNotNull () { assertNotNull(Lookup.getDefault().lookup(DataLoaderPool.class)); } public void testRepositoryNotNull () { assertNotNull(Repository.getDefault()); } public void testStdOut () { assertNotNull (IOProvider.getDefault()); } public void testGetClipboardNotNull () { Clipboard c = (Clipboard)Lookup.getDefault().lookup(Clipboard.class); assertNotNull(c); assertEquals(c, Lookup.getDefault().lookup(ExClipboard.class)); } public void testGetServices () { assertNotNull(Lookup.getDefault().lookup(ServiceType.Registry.class)); } public void testGetActionManager () { assertNotNull(Lookup.getDefault().lookup(ActionManager.class)); } public void testGlobalKeymap () { assertNotNull(Lookup.getDefault().lookup(Keymap.class)); } public void testNodeOperation () { assertNotNull(NodeOperation.getDefault()); } public void testWindowManager () { assertNotNull(WindowManager.getDefault()); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.