1 18 19 package org.apache.strutsel.taglib.html; 20 21 import junit.framework.Test; 22 import junit.framework.TestSuite; 23 import org.apache.commons.logging.Log; 24 import org.apache.commons.logging.LogFactory; 25 import org.apache.strutsel.taglib.utils.JspTagTestCase; 26 27 public class TestELFormTag extends JspTagTestCase 28 { 29 30 protected static final String ACTION_NAME = "stuff"; 31 protected static final String FORM_BEAN_CLASS = 32 "org.apache.strutsel.taglib.utils.TestFormBean"; 33 34 protected static final String REQUIRED_NAME_VALUE_KEY = 35 "RequiredNameValue"; 36 protected static final String REQUIRED_METHOD_VALUE_KEY = 37 "RequiredMethodValue"; 38 protected static final String REQUIRED_ACTION_VALUE_KEY = 39 "RequiredActionValue"; 40 41 protected ELFormTag elFormTag = null; 42 43 private static Log log = LogFactory.getLog(TestELFormTag.class); 44 45 public TestELFormTag(String theName) { 46 super(theName); 47 } 48 49 public static void main(String [] args) { 50 junit.awtui.TestRunner.main( 51 new String [] { TestELFormTag.class.getName() }); 52 } 53 54 public static Test suite() { 55 return new TestSuite(TestELFormTag.class); 56 } 57 58 public void setUp() { 59 elFormTag = new ELFormTag(); 60 elFormTag.setPageContext(pageContext); 61 } 62 63 68 protected String convertActionNameToPath(String actionName) 69 { 70 String value = actionName; 71 72 int questionLoc = actionName.indexOf("?"); 73 if (questionLoc >= 0) 74 value = value.substring(0, questionLoc); 75 76 int slashLoc = value.lastIndexOf("/"); 77 int periodLoc = value.lastIndexOf("."); 78 79 if ((periodLoc >= 0) && (periodLoc > slashLoc)) 80 value = value.substring(0, periodLoc); 81 82 if (!value.startsWith("/")) 83 value = "/" + value; 84 85 return (value); 86 } 87 88 98 107 133 142 146 153 155 159 public void testDummy() 160 { 161 } 162 163 170 172 175 179 182 185 188 193 197 199 203 207 210 212 230 237 239 242 246 249 252 255 260 264 267 271 275 278 280 } 298 | Popular Tags |