1 19 20 package org.netbeans.modules.junit; 21 22 import java.awt.event.ActionEvent ; 23 import java.awt.Component ; 24 import javax.swing.*; 25 import org.openide.util.HelpCtx; 26 import org.openide.util.NbBundle; 27 import org.openide.util.actions.Presenter; 28 import org.openide.util.actions.SystemAction; 29 import junit.framework.*; 30 31 public class TestsActionTest extends TestCase { 32 33 public TestsActionTest(java.lang.String testName) { 34 super(testName); 35 } 36 37 public static void main(java.lang.String [] args) { 38 junit.textui.TestRunner.run(suite()); 39 } 40 41 public static Test suite() { 42 TestSuite suite = new TestSuite(TestsActionTest.class); 43 44 return suite; 45 } 46 47 48 public void testActionPerformed() { 49 System.out.println("testActionPerformed"); 50 } 52 53 54 public void testGetName() { 55 System.out.println("testGetName"); 56 String name = TO.getName(); 57 assertTrue(null != name); 58 } 59 60 61 public void testIconResource() { 62 System.out.println("testIconResource"); 63 String icon = TO.iconResource(); 64 assertTrue(null != icon); 65 } 66 67 68 public void testGetHelpCtx() { 69 System.out.println("testGetHelpCtx"); 70 HelpCtx hc = TO.getHelpCtx(); 71 assertTrue(null != hc); 72 } 73 74 75 public void testGetMenuPresenter() { 76 System.out.println("testGetMenuPresenter"); 77 JMenuItem jm = TO.getMenuPresenter(); 78 assertTrue(null != jm); 79 } 80 81 82 public void testGetPopupPresenter() { 83 System.out.println("testGetPopupPresenter"); 84 JMenuItem jm = TO.getPopupPresenter(); 85 assertTrue(null != jm); 86 } 87 88 89 public void testGetToolbarPresenter() { 90 System.out.println("testGetToolbarPresenter"); 91 Component c = TO.getToolbarPresenter(); 92 assertTrue(null != c); 93 } 94 95 96 protected CreateTestAction TO = null; 97 98 protected void setUp() { 99 if (null == TO) 100 TO = (CreateTestAction)CreateTestAction.findObject(CreateTestAction.class, true); 101 } 102 103 protected void tearDown() { 104 } 105 } 106 | Popular Tags |