1 24 25 package org.netbeans.modules.extbrowser; 26 27 import junit.framework.*; 28 import org.netbeans.junit.*; 29 import java.beans.*; 30 import java.io.IOException ; 31 import java.net.URL ; 32 import org.openide.ErrorManager; 33 import org.openide.NotifyDescriptor; 34 import org.openide.awt.HtmlBrowser; 35 import org.openide.execution.NbProcessDescriptor; 36 import org.openide.util.HelpCtx; 37 import org.openide.util.NbBundle; 38 import org.openide.util.Utilities; 39 40 44 public class SimpleExtBrowserTest extends NbTestCase { 45 46 public SimpleExtBrowserTest (java.lang.String testName) { 47 super(testName); 48 } 49 50 public static void main(java.lang.String [] args) { 51 junit.textui.TestRunner.run(suite()); 52 } 53 54 55 public void testGetName () { 56 if (testObject.getName () == null) 57 fail ("SimpleExtBrowser.getName () returns <null>."); 58 } 59 60 61 public void testSetName () { 62 testObject.setName ("Dummy"); 63 } 64 65 66 public void testCreateHtmlBrowserImpl () { 67 if (testObject.createHtmlBrowserImpl () == null) 68 fail ("SimpleExtBrowser.createHtmlBrowserImpl () returns <null>."); 69 } 70 71 72 public void testGetBrowserExecutable () { 73 if (testObject.getBrowserExecutable () == null) 74 fail ("SimpleExtBrowser.getBrowserExecutable () returns <null>."); 75 } 76 77 78 public void testSetBrowserExecutable () { 79 testObject.setBrowserExecutable (new NbProcessDescriptor ("netscape", "")); 80 } 81 82 83 public void testAddPropertyChangeListener () { 84 testObject.addPropertyChangeListener (new PropertyChangeListener () { 85 public void propertyChange (PropertyChangeEvent evt) {} 86 }); 87 } 88 89 90 public void testRemovePropertyChangeListener () { 91 testObject.removePropertyChangeListener (new PropertyChangeListener () { 92 public void propertyChange (PropertyChangeEvent evt) {} 93 }); 94 } 95 96 public static Test suite () { 97 TestSuite suite = new NbTestSuite (SimpleExtBrowserTest.class); 98 99 return suite; 100 } 101 102 protected SimpleExtBrowser testObject; 106 107 protected void setUp () { 108 testObject = new SimpleExtBrowser (); 109 } 110 111 } 112 | Popular Tags |