1 5 package com.opensymphony.webwork.views.jsp; 6 7 import javax.servlet.jsp.JspException ; 8 9 10 16 public class BeanTagTest extends AbstractUITagTest { 17 19 public void testSimple() { 20 BeanTag tag = new BeanTag(); 21 tag.setPageContext(pageContext); 22 tag.setName("com.opensymphony.webwork.TestAction"); 23 24 try { 25 tag.doStartTag(); 26 tag.addParameter("result", "success"); 27 28 assertEquals("success", stack.findValue("result")); 29 assertEquals(3, stack.size()); 31 tag.doEndTag(); 32 assertEquals(2, stack.size()); 33 } catch (JspException ex) { 34 ex.printStackTrace(); 35 fail(); 36 } 37 38 request.verify(); 39 pageContext.verify(); 40 } 41 } 42 | Popular Tags |