source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/src/testcases/org/apache/tools/ant/taskdefs/optional/XalanLiaisonTest.java@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 1.7 KB
Line 
1package org.apache.tools.ant.taskdefs.optional;
2
3/*
4 * Copyright 2001-2002,2004 The Apache Software Foundation
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
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,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20import org.apache.tools.ant.taskdefs.XSLTLiaison;
21
22import java.io.File;
23
24/**
25 * Xalan Liaison testcase
26 */
27public class XalanLiaisonTest extends AbstractXSLTLiaisonTest {
28 public XalanLiaisonTest(String name){
29 super(name);
30 }
31
32 public void tearDown() {
33 File f = new File("xalan1-redirect-out.tmp");
34 if (f.exists()) {
35 f.delete();
36 }
37 }
38
39 protected XSLTLiaison createLiaison() throws Exception {
40 return new XalanLiaison();
41 }
42
43 public void testXalan1Redirect() throws Exception {
44 File xsl = getFile("/taskdefs/optional/xalan-redirect-in.xsl");
45 liaison.setStylesheet(xsl);
46 File out = new File("xalan1-redirect-out-dummy.tmp");
47 File in = getFile("/taskdefs/optional/xsltliaison-in.xsl");
48 try {
49 liaison.addParam("xalan-version", "1");
50 liaison.transform(in, out);
51 } finally {
52 out.delete();
53 }
54 }
55}
56
Note: See TracBrowser for help on using the repository browser.