KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > XslTalTestCase


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
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 package org.apache.cocoon;
17
18 /**
19  * Check the xsltal testdoc.html document
20  * @version $Id: $
21  */

22 public class XslTalTestCase
23     extends HtmlUnitTestCase
24 {
25     static final String JavaDoc pageurl = "/samples/blocks/xsltal/plain/testdoc.html";
26
27     public void testXslTalTestDoc()
28         throws Exception JavaDoc
29     {
30         loadHtmlPage(pageurl);
31
32         final String JavaDoc pageTitle = "This is the XSLTAL test document";
33         assertXPath("/html/head/title", pageTitle);
34         assertXPath("/html/body/div[1]/@class", "content");
35         assertXPath("/html/body/h1[1]", pageTitle);
36         assertXPath("/html/body/p[1]", "First paragraph of the test document.");
37         assertXPath("/html/body/p[2]", "Second paragraph of the test document.");
38     }
39 }
40
Popular Tags