1 5 package com.opensymphony.webwork.views.jsp.ui; 6 7 import com.opensymphony.webwork.TestAction; 8 import com.opensymphony.webwork.views.jsp.AbstractUITagTest; 9 10 11 16 public class FileTest extends AbstractUITagTest { 17 19 public FileTest() { 20 } 21 22 24 public void testSimple() throws Exception { 25 TestAction testAction = (TestAction) action; 26 testAction.setFoo("bar"); 27 28 FileTag tag = new FileTag(); 29 tag.setPageContext(pageContext); 30 tag.setLabel("mylabel"); 31 tag.setName("myname"); 32 tag.setAccept("*.txt"); 33 tag.setValue("%{foo}"); 34 tag.setSize("10"); 35 36 tag.doStartTag(); 37 tag.doEndTag(); 38 39 verify(TextFieldTag.class.getResource("File-1.txt")); 40 } 41 } 42 | Popular Tags |