1 16 17 package org.apache.taglibs.standard.tag.el.core; 18 19 import javax.servlet.jsp.*; 20 import org.apache.cactus.*; 21 import org.apache.taglibs.standard.testutil.TestUtil; 22 23 public class TestSetTag 24 extends JspTestCase { 25 27 public TestSetTag(String name) { 28 super(name); 29 } 30 31 protected void setUp() throws Exception { 32 super.setUp(); 33 } 34 35 protected void tearDown() throws Exception { 36 super.tearDown(); 37 } 38 39 public void testSetTag() throws Exception { 40 String var = "var1"; 41 String expected = "value1"; 42 String toInclude = TestUtil.getTestJsp(this); 43 pageContext.include(toInclude); 44 String actual = (String ) pageContext.getAttribute(var, 45 PageContext.APPLICATION_SCOPE); 46 assertEquals(expected, actual); 47 } 48 } 49 | Popular Tags |