1 18 package org.apache.struts.taglib.html; 19 20 import java.util.Locale ; 21 22 import javax.servlet.jsp.PageContext ; 23 24 import junit.framework.Test; 25 import junit.framework.TestSuite; 26 27 import org.apache.cactus.JspTestCase; 28 import org.apache.struts.Globals; 29 import org.apache.struts.taglib.SimpleBeanForTesting; 30 31 36 public class TestFrameTag8 extends JspTestCase { 37 38 43 public TestFrameTag8(String theName) { 44 super(theName); 45 } 46 47 52 public static void main(String [] theArgs) { 53 junit.awtui.TestRunner.main(new String [] {TestFrameTag8.class.getName()}); 54 } 55 56 60 public static Test suite() { 61 return new TestSuite(TestFrameTag8.class); 63 } 64 65 private void runMyTest(String whichTest, String locale) throws Exception { 66 pageContext.setAttribute(Globals.LOCALE_KEY, new Locale (locale, locale), PageContext.SESSION_SCOPE); 67 pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE); 68 request.setAttribute("runTest", whichTest); 69 pageContext.forward("/test/org/apache/struts/taglib/html/TestFrameTag8.jsp"); 70 } 71 72 75 76 public void testFramePageParamIdParamNameNoScope() throws Exception { 78 pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE); 79 runMyTest("testFramePageParamIdParamNameNoScope", ""); 80 } 81 82 public void testFramePageParamIdParamNameParamPropertyNoScope() throws Exception { 83 SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue"); 84 pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE); 85 runMyTest("testFramePageParamIdParamNameParamPropertyNoScope", ""); 86 } 87 88 public void testFramePageParamIdParamNameApplicationScope() throws Exception { 89 pageContext.setAttribute("paramName", "paramValue", PageContext.APPLICATION_SCOPE); 90 runMyTest("testFramePageParamIdParamNameApplicationScope", ""); 91 } 92 93 public void testFramePageParamIdParamNameParamPropertyApplicationScope() throws Exception { 94 SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue"); 95 pageContext.setAttribute("testingParamProperty", sbft, PageContext.APPLICATION_SCOPE); 96 runMyTest("testFramePageParamIdParamNameParamPropertyApplicationScope", ""); 97 } 98 99 public void testFramePageParamIdParamNameSessionScope() throws Exception { 100 pageContext.setAttribute("paramName", "paramValue", PageContext.SESSION_SCOPE); 101 runMyTest("testFramePageParamIdParamNameSessionScope", ""); 102 } 103 104 public void testFramePageParamIdParamNameParamPropertySessionScope() throws Exception { 105 SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue"); 106 pageContext.setAttribute("testingParamProperty", sbft, PageContext.SESSION_SCOPE); 107 runMyTest("testFramePageParamIdParamNameParamPropertySessionScope", ""); 108 } 109 110 public void testFramePageParamIdParamNameRequestScope() throws Exception { 111 pageContext.setAttribute("paramName", "paramValue", PageContext.REQUEST_SCOPE); 112 runMyTest("testFramePageParamIdParamNameRequestScope", ""); 113 } 114 115 public void testFramePageParamIdParamNameParamPropertyRequestScope() throws Exception { 116 SimpleBeanForTesting sbft = new SimpleBeanForTesting("paramPropertyValue"); 117 pageContext.setAttribute("testingParamProperty", sbft, PageContext.REQUEST_SCOPE); 118 runMyTest("testFramePageParamIdParamNameParamPropertyRequestScope", ""); 119 } 120 121 public void testFramePageScrolling1() throws Exception { 122 runMyTest("testFramePageScrolling1", ""); 123 } 124 125 public void testFramePageScrollin2g() throws Exception { 126 runMyTest("testFramePageScrolling2", ""); 127 } 128 129 public void testFramePageScrolling3() throws Exception { 130 runMyTest("testFramePageScrolling3", ""); 131 } 132 133 public void testFramePageScrolling4() throws Exception { 134 runMyTest("testFramePageScrolling4", ""); 135 } 136 137 public void testFramePageScrolling5() throws Exception { 138 runMyTest("testFramePageScrolling5", ""); 139 } 140 141 public void testFramePageScrolling6() throws Exception { 142 runMyTest("testFramePageScrolling6", ""); 143 } 144 145 public void testFramePageScrolling7() throws Exception { 146 runMyTest("testFramePageScrolling7", ""); 147 } 148 149 public void testFramePageScrolling8() throws Exception { 150 runMyTest("testFramePageScrolling8", ""); 151 } 152 153 public void testFramePageScrolling9() throws Exception { 154 runMyTest("testFramePageScrolling9", ""); 155 } 156 157 public void testFramePageScrolling10() throws Exception { 158 runMyTest("testFramePageScrolling10", ""); 159 } 160 161 public void testFramePageStyle() throws Exception { 162 runMyTest("testFramePageStyle", ""); 163 } 164 165 public void testFramePageTitle() throws Exception { 166 runMyTest("testFramePageTitle", ""); 167 } 168 169 public void testFramePageTitleKey() throws Exception { 170 runMyTest("testFramePageTitleKey", ""); 171 } 172 173 public void testFramePageTransaction() throws Exception { 174 pageContext.setAttribute(Globals.TRANSACTION_TOKEN_KEY, "Some_Token_Here", PageContext.SESSION_SCOPE); 175 runMyTest("testFramePageTransaction", ""); 176 } 177 178 179 180 181 182 } 183 | Popular Tags |