01: /*
02: * $Id: LibraryTest.java 460266 2006-04-16 13:42:28Z jdonnerstag $ $Revision: 460266 $
03: * $Date: 2006-04-16 15:42:28 +0200 (Sun, 16 Apr 2006) $
04: *
05: * ==================================================================== Licensed
06: * under the Apache License, Version 2.0 (the "License"); you may not use this
07: * file except in compliance with the License. You may obtain a copy of the
08: * License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15: * License for the specific language governing permissions and limitations under
16: * the License.
17: */
18: package wicket.examples.library;
19:
20: import junit.framework.Test;
21: import wicket.examples.WicketWebTestCase;
22:
23: /**
24: * jWebUnit test for Hello World.
25: */
26: public class LibraryTest extends WicketWebTestCase {
27: /**
28: *
29: * @return Test
30: */
31: public static Test suite() {
32: return suite(LibraryTest.class);
33: }
34:
35: /**
36: * Construct.
37: *
38: * @param name
39: * name of test
40: */
41: public LibraryTest(String name) {
42: super (name);
43: }
44:
45: /**
46: * Test page.
47: *
48: * @throws Exception
49: */
50: public void test_1() throws Exception {
51: beginAt("/library");
52: this .dumpResponse(System.out);
53: assertTitleEquals("Wicket Examples - library");
54: assertTextPresent("Username and password are both");
55:
56: this .setFormElement("username", "wicket");
57: this .setFormElement("password", "wicket");
58: this .submit("submit");
59: // this.dumpResponse(System.out);
60: assertTitleEquals("Wicket Examples - library");
61: assertTextPresent("Effective Java (Joshua Bloch)");
62: }
63: }
|