|
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-2000 Sun * Microsystems, Inc. All Rights Reserved. * * UnixWebBrowserTest.java * NetBeans JUnit based test * * Created on November 2, 2001, 10:42 AM */ package org.netbeans.modules.extbrowser; import junit.framework.*; import org.netbeans.junit.*; import java.io.ObjectStreamException; import org.openide.NotifyDescriptor; import org.openide.awt.HtmlBrowser; import org.openide.execution.ExecInfo; import org.openide.execution.NbProcessDescriptor; import org.openide.util.NbBundle; import org.openide.util.Utilities; /** * * @author rk109395 */ public class UnixWebBrowserTest extends NbTestCase { public UnixWebBrowserTest (java.lang.String testName) { super(testName); } public static void main(java.lang.String[] args) { junit.textui.TestRunner.run(suite()); } /** Test of isHidden method, of class org.netbeans.modules.extbrowser.UnixWebBrowser. */ public void testIsHidden () { if (org.openide.util.Utilities.isUnix () == UnixWebBrowser.isHidden ().booleanValue ()) fail ("Unexpected result from UnixWebBrowser.isHidden ()."); } /** Test of createHtmlBrowserImpl method, of class org.netbeans.modules.extbrowser.UnixWebBrowser. */ public void testCreateHtmlBrowserImpl () { boolean success = true; try { if (testObject.createHtmlBrowserImpl () == null) success = false; } catch (UnsupportedOperationException ex) { if (org.openide.util.Utilities.isUnix ()) success = false; } if (!success) fail ("UnixWebBrowser.createHtmlBrowserImpl () failed."); } /** Test of defaultBrowserExecutable method, of class org.netbeans.modules.extbrowser.UnixWebBrowser. */ public void testDefaultBrowserExecutable () { if (testObject.defaultBrowserExecutable () == null) fail ("UnixWebBrowser.defaultBrowserExecutable () failed."); } public static Test suite () { TestSuite suite = new NbTestSuite (UnixWebBrowserTest.class); return suite; } // Add test methods here, they have to start with 'test' name. // for example: // public void testHello() {} protected UnixWebBrowser testObject; protected void setUp () { testObject = new UnixWebBrowser (); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.