01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.wicket.markup.html.link;
18:
19: import org.apache.wicket.WicketTestCase;
20:
21: /**
22: * Test autolinks (href="...")
23: *
24: * @author Juergen Donnerstag
25: */
26: public class AutolinkTest extends WicketTestCase {
27: /**
28: * Create the test.
29: *
30: * @param name
31: * The test name
32: */
33: public AutolinkTest(String name) {
34: super (name);
35: }
36:
37: /**
38: * @throws Exception
39: */
40: public void testRenderHomePage_1() throws Exception {
41: tester.getApplication().getMarkupSettings()
42: .setAutomaticLinking(true);
43: executeTest(AutolinkPage_1.class,
44: "AutolinkPageExpectedResult_1.html");
45: }
46:
47: /**
48: * @throws Exception
49: */
50: public void testRenderHomePage_2() throws Exception {
51: tester.getApplication().getMarkupSettings()
52: .setAutomaticLinking(true);
53: tester.getApplication().getMarkupSettings().setStripWicketTags(
54: true);
55: executeTest(AutolinkPage_2.class,
56: "AutolinkPageExpectedResult_2.html");
57: }
58:
59: /**
60: * @throws Exception
61: */
62: public void testRenderHomePage_3() throws Exception {
63: tester.getApplication().getMarkupSettings()
64: .setAutomaticLinking(true);
65: executeTest(AutolinkPage_3.class,
66: "AutolinkPageExpectedResult_3.html");
67: }
68:
69: /**
70: * @throws Exception
71: */
72: public void testRenderHomePage_4() throws Exception {
73: tester.getApplication().getMarkupSettings()
74: .setAutomaticLinking(true);
75: executeTest(AutolinkPage_4.class,
76: "AutolinkPageExpectedResult_4.html");
77: }
78: }
|