001: /*
002: * $Id: HeaderSectionTest.java 461190 2006-06-28 06:35:51Z ehillenius $
003: * $Revision: 461190 $
004: * $Date: 2006-06-28 08:35:51 +0200 (Wed, 28 Jun 2006) $
005: *
006: * ====================================================================
007: * Licensed under the Apache License, Version 2.0 (the "License");
008: * you may not use this file except in compliance with the License.
009: * You may obtain a copy of the License at
010: *
011: * http://www.apache.org/licenses/LICENSE-2.0
012: *
013: * Unless required by applicable law or agreed to in writing, software
014: * distributed under the License is distributed on an "AS IS" BASIS,
015: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016: * See the License for the specific language governing permissions and
017: * limitations under the License.
018: */
019: package wicket.markup.parser.filter;
020:
021: import org.apache.commons.logging.Log;
022: import org.apache.commons.logging.LogFactory;
023:
024: import wicket.WicketRuntimeException;
025: import wicket.WicketTestCase;
026: import wicket.markup.html.PackageResource;
027: import wicket.util.resource.IResourceStream;
028:
029: /**
030: * Simple application that demonstrates the mock http application code (and
031: * checks that it is working)
032: *
033: * @author Chris Turner
034: */
035: public class HeaderSectionTest extends WicketTestCase {
036: private static final Log log = LogFactory
037: .getLog(HeaderSectionTest.class);
038:
039: /**
040: * Create the test.
041: *
042: * @param name
043: * The test name
044: */
045: public HeaderSectionTest(String name) {
046: super (name);
047: }
048:
049: /**
050: * @throws Exception
051: */
052: public void testRenderHomePage_1() throws Exception {
053: executeTest(HeaderSectionPage_1.class,
054: "HeaderSectionPageExpectedResult_1.html");
055: }
056:
057: /**
058: * @throws Exception
059: */
060: public void testRenderHomePage_2() throws Exception {
061: executeTest(HeaderSectionPage_2.class,
062: "HeaderSectionPageExpectedResult_2.html");
063: }
064:
065: /**
066: * @throws Exception
067: */
068: public void testRenderHomePage_3() throws Exception {
069: executeTest(HeaderSectionPage_3.class,
070: "HeaderSectionPageExpectedResult_3.html");
071: }
072:
073: /**
074: * @throws Exception
075: */
076: public void testRenderHomePage_4() throws Exception {
077: executeTest(HeaderSectionPage_4.class,
078: "HeaderSectionPageExpectedResult_4.html");
079: }
080:
081: /**
082: * @throws Exception
083: */
084: public void testRenderHomePage_5() throws Exception {
085: executeTest(HeaderSectionPage_5.class,
086: "HeaderSectionPageExpectedResult_5.html");
087: }
088:
089: /**
090: * @throws Exception
091: */
092: public void testRenderHomePage_6() throws Exception {
093: executeTest(HeaderSectionPage_6.class,
094: "HeaderSectionPageExpectedResult_6.html");
095: }
096:
097: /**
098: * @throws Exception
099: */
100: public void testRenderHomePage_7() throws Exception {
101: executeTest(HeaderSectionPage_7.class,
102: "HeaderSectionPageExpectedResult_7.html");
103: }
104:
105: /**
106: * @throws Exception
107: */
108: public void testRenderHomePage_8() throws Exception {
109: executeTest(HeaderSectionPage_8.class,
110: "HeaderSectionPageExpectedResult_8.html");
111: }
112:
113: /**
114: * @throws Exception
115: */
116: public void testRenderHomePage_9() throws Exception {
117: executeTest(HeaderSectionPage_9.class,
118: "HeaderSectionPageExpectedResult_9.html");
119: }
120:
121: /**
122: * @throws Exception
123: */
124: public void testRenderHomePage_9a() throws Exception {
125: executeTest(HeaderSectionPage_9a.class,
126: "HeaderSectionPageExpectedResult_9a.html");
127: }
128:
129: /**
130: * @throws Exception
131: */
132: public void testRenderHomePage_10() throws Exception {
133: executeTest(HeaderSectionPage_10.class,
134: "HeaderSectionPageExpectedResult_10.html");
135: }
136:
137: /**
138: * @throws Exception
139: */
140: public void testRenderHomePage_11() throws Exception {
141: executeTest(HeaderSectionPage_11.class,
142: "HeaderSectionPageExpectedResult_11.html");
143: }
144:
145: /**
146: * @throws Exception
147: */
148: public void testRenderHomePage_12() throws Exception {
149: executeTest(HeaderSectionPage_12.class,
150: "HeaderSectionPageExpectedResult_12.html");
151: PackageResource res = (PackageResource) application
152: .getSharedResources()
153: .get(
154: "wicket.markup.parser.filter.sub.HeaderSectionBorder/cborder.css");
155: assertNotNull(res);
156: String absPath = res.getAbsolutePath();
157: assertNotNull(absPath);
158: IResourceStream stream = res.getResourceStream();
159: assertNotNull(stream);
160: }
161:
162: /**
163: * @throws Exception
164: */
165: public void testRenderHomePage_13() throws Exception {
166: boolean hit = false;
167: try {
168: executeTest(HeaderSectionPage_13.class,
169: "HeaderSectionPageExpectedResult_13.html");
170: } catch (WicketRuntimeException ex) {
171: hit = true;
172: }
173: assertTrue("Expected a MarkupException to be thrown", hit);
174: }
175:
176: /**
177: * @throws Exception
178: */
179: public void testRenderHomePage_14() throws Exception {
180: executeTest(HeaderSectionPage_14.class,
181: "HeaderSectionPageExpectedResult_14.html");
182: }
183:
184: /**
185: * @throws Exception
186: */
187: public void testRenderHomePage_15() throws Exception {
188: executeTest(HeaderSectionPage_15.class,
189: "HeaderSectionPageExpectedResult_15.html");
190: }
191:
192: /**
193: * @throws Exception
194: */
195: public void testRenderHomePage_16() throws Exception {
196: executeTest(HeaderSectionPage_16.class,
197: "HeaderSectionPageExpectedResult_16.html");
198: }
199:
200: /**
201: * @throws Exception
202: */
203: public void testRenderHomePage_17() throws Exception {
204: executeTest(HeaderSectionPage_17.class,
205: "HeaderSectionPageExpectedResult_17.html");
206: }
207:
208: /**
209: * @throws Exception
210: */
211: public void testRenderHomePage_18() throws Exception {
212: executeTest(HeaderSectionPage_18.class,
213: "HeaderSectionPageExpectedResult_18.html");
214: }
215:
216: /**
217: * @throws Exception
218: */
219: public void testRenderHomePage_19() throws Exception {
220: executeTest(HeaderSectionPage_19.class,
221: "HeaderSectionPageExpectedResult_19.html");
222: }
223: }
|