1 /**
2 * Copyright 2003-2007 Greg Luck
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package net.sf.ehcache.constructs.web;
18
19 import com.meterware.httpunit.WebResponse;
20
21 /**
22 * Tests that the test Orion server is properly installed and running.
23 * @author <a href="mailto:gluck@thoughtworks.com">Greg Luck</a>
24 * @version $Id: BasicWebServerTest.java 512 2007-07-10 09:18:45Z gregluck $
25 */
26 public class BasicWebServerTest extends AbstractWebTest {
27
28 /**
29 * Tests Orion supplied page
30 */
31 public void testOrionDefaultPage() throws Exception {
32 WebResponse response = getResponseFromAcceptGzipRequest("/index.html");
33 assertResponseOk(response);
34 }
35
36 /**
37 * Tests that we have enough of Orion to use a JSP
38 */
39 public void testBasicJsp() throws Exception {
40 WebResponse response = getResponseFromAcceptGzipRequest("/Login.jsp");
41 assertResponseGood(response, true);
42 }
43
44 /**
45 * Tests that a page which is not in the cache filter pattern is not cached.
46 */
47 public void testUncachedPageIsNotCached() throws Exception {
48 assertResponseGoodAndNotCached("/Login.jsp", true);
49 }
50
51 }