1 7 8 package org.jdesktop.jdnc; 9 10 import org.jdesktop.swing.actions.AbstractActionExt; 11 import org.jdesktop.swing.actions.BoundAction; 12 import org.jdesktop.swing.actions.TargetableAction; 13 14 import org.jdesktop.jdnc.actions.CollapseAction; 15 import org.jdesktop.jdnc.actions.ExpandAction; 16 import org.jdesktop.jdnc.actions.FindAction; 17 import org.jdesktop.jdnc.actions.PrintAction; 18 import org.jdesktop.jdnc.actions.SubmitAction; 19 import org.jdesktop.jdnc.actions.ResetAction; 20 21 import junit.framework.TestCase; 22 23 26 public class JNActionsTest extends TestCase { 27 28 private AbstractActionExt[] actions; 29 30 private static final int NUM_ACTIONS = 6; 31 32 protected void setUp() { 33 actions = new AbstractActionExt[NUM_ACTIONS]; 34 actions[0] = new CollapseAction(); 35 actions[1] = new ExpandAction(); 36 actions[2] = new FindAction(); 37 actions[3] = new PrintAction(); 38 actions[4] = new SubmitAction(); 39 actions[5] = new ResetAction(); 40 } 41 42 public void testProperties() { 43 44 assertEquals("Submit", actions[4].getName()); 45 assertEquals("submit", actions[4].getActionCommand()); 46 47 assertEquals("Reset", actions[5].getName()); 48 assertEquals("reset", actions[5].getActionCommand()); 49 50 } 51 } 52 53 | Popular Tags |