1 24 25 package org.netbeans.modules.extbrowser; 26 27 import junit.framework.*; 28 import org.netbeans.junit.*; 29 import java.beans.*; 30 import org.openide.ErrorManager; 31 import org.openide.execution.NbProcessDescriptor; 32 import org.openide.util.NbBundle; 33 import org.openide.awt.HtmlBrowser; 34 35 39 public class ExtWebBrowserTest extends NbTestCase { 40 41 public ExtWebBrowserTest (java.lang.String testName) { 42 super(testName); 43 } 44 45 public static void main(java.lang.String [] args) { 46 junit.textui.TestRunner.run(suite()); 47 } 48 49 50 55 56 57 public void testGetBrowserExecutable () { 58 if (testObject.getBrowserExecutable () == null) 59 fail ("ExtWebBrowser.getBrowserExecutable () returns <null>."); 60 } 61 62 63 public void testSetBrowserExecutable () { 64 testObject.setBrowserExecutable (new NbProcessDescriptor ("netscape", "")); 65 } 66 67 68 71 72 73 76 77 78 public void testDefaultBrowserExecutable () { 79 if (testObject.defaultBrowserExecutable () == null) 80 fail ("ExtWebBrowser.defaultBrowserExecutable () failed."); 81 } 82 83 84 public void testCreateHtmlBrowserImpl () { 85 testObject.createHtmlBrowserImpl (); 86 } 87 88 89 public void testAddPropertyChangeListener () { 90 testObject.addPropertyChangeListener (new PropertyChangeListener () { 91 public void propertyChange (PropertyChangeEvent evt) {} 92 }); 93 } 94 95 96 public void testRemovePropertyChangeListener () { 97 testObject.removePropertyChangeListener (new PropertyChangeListener () { 98 public void propertyChange (PropertyChangeEvent evt) {} 99 }); 100 } 101 102 103 public void testGetDDEServer () { 104 testObject.getDDEServer (); 105 } 106 107 108 public void testSetDDEServer () { 109 testObject.setDDEServer ("NETSCAPE"); 110 } 111 112 public static Test suite () { 113 TestSuite suite = new NbTestSuite (ExtWebBrowserTest.class); 114 115 return suite; 116 } 117 118 protected ExtWebBrowser testObject; 122 123 protected void setUp () { 124 testObject = new ExtWebBrowser (); 125 } 126 127 } 128 | Popular Tags |