Methods Summary |
---|
protected void | setUp()
super.setUp();
tag = new SetTag();
chewie = new Chewbacca("chewie", true);
stack.push(chewie);
tag.setPageContext(pageContext);
|
public void | testApplicationScope()
tag.setName("foo");
tag.setValue("name");
tag.setScope("application");
tag.doStartTag();
tag.doEndTag();
assertEquals("chewie", servletContext.getAttribute("foo"));
|
public void | testPageScope()
tag.setName("foo");
tag.setValue("name");
tag.setScope("page");
tag.doStartTag();
tag.doEndTag();
assertEquals("chewie", pageContext.getAttribute("foo"));
|
public void | testRequestScope()
tag.setName("foo");
tag.setValue("name");
tag.setScope("request");
tag.doStartTag();
tag.doEndTag();
assertEquals("chewie", request.getAttribute("foo"));
|
public void | testSessionScope()
tag.setName("foo");
tag.setValue("name");
tag.setScope("session");
tag.doStartTag();
tag.doEndTag();
assertEquals("chewie", session.get("foo"));
|
public void | testStrutsScope()
tag.setName("foo");
tag.setValue("name");
tag.doStartTag();
tag.doEndTag();
assertEquals("chewie", context.get("foo"));
|
public void | testStrutsScope2()
tag.setName("chewie");
tag.doStartTag();
tag.doEndTag();
assertEquals(chewie, context.get("chewie"));
|