KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > xml > xmlc > html > HtmlBasicTest


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  *
21  * $Id: HtmlBasicTest.java,v 1.2 2005/01/26 08:29:25 jkjome Exp $
22  */

23
24 package org.enhydra.xml.xmlc.html;
25
26 import java.io.File JavaDoc;
27
28 import org.enhydra.xml.xmlc.driver.ExecXmlc;
29 import org.enhydra.xml.xmlc.driver.XmlcBasicTest;
30
31 /**
32  * Class to run a basic set of XMLC tests on HTML files given a set of
33  * parameters. This is extended to implement specific test cases.
34  */

35 public class HtmlBasicTest extends XmlcBasicTest {
36     /** HTML encoding to use */
37     private String JavaDoc fHtmlEncoding;
38
39     /**
40      * Constructor.
41      */

42     public HtmlBasicTest(HtmlTestCaseBase testCase,
43                          File JavaDoc inputDoc) {
44         super(testCase, "html", inputDoc);
45     }
46
47     /** Set the HTML encoding to use. */
48     public void setHtmlEncoding(String JavaDoc encoding) {
49         fHtmlEncoding = encoding;
50     }
51
52     /**
53      * Add the cyberstudio tag set.
54      */

55     public void addCyberStudioTags() {
56         addBoth(ExecXmlc.OPT_ADD_TAG_SET);
57         addBoth(ExecXmlc.CYBERSTUDIO_TAG_SET);
58     }
59
60     /**
61      * Build a ExecXmlc object with argument required for the initial compile
62      * and the recompile/dump
63      */

64     protected void addStdOpts(ExecXmlc execXmlc) {
65         if (fHtmlEncoding != null) {
66             execXmlc.addOpt(ExecXmlc.OPT_HTML_ENCODING, fHtmlEncoding);
67         }
68     }
69 }
70
Popular Tags