KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xsl > transform > TransformServletTest


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.xsl.transform;
20
21 //import java.io.*;
22
import java.net.*;
23 //import java.util.*;
24

25 //import javax.servlet.*;
26
//import javax.servlet.http.*;
27

28 import junit.framework.*;
29 import org.netbeans.junit.*;
30
31 /*import org.openide.util.HttpServer;
32 import org.openide.filesystems.FileObject;
33 import org.openide.util.SharedClassObject;
34 import org.openide.filesystems.FileUtil;
35 import org.openide.execution.NbfsURLConnection;
36
37 import org.xml.sax.*;
38 import javax.xml.parsers.*;
39 import javax.xml.transform.*;
40 import javax.xml.transform.sax.*;
41 import javax.xml.transform.stream.*;
42
43 import org.netbeans.api.xml.cookies.*;
44 import org.netbeans.spi.xml.cookies.*;
45
46 import org.netbeans.modules.xsl.utils.TransformUtil;
47 */

48 /**
49  *
50  * @author Libor Kramolis
51  */

52 public class TransformServletTest extends NbTestCase {
53     
54     public TransformServletTest(java.lang.String JavaDoc testName) {
55         super(testName);
56     }
57     
58     public static void main(java.lang.String JavaDoc[] args) {
59         junit.textui.TestRunner.run(suite());
60     }
61     
62     public static Test suite() {
63         TestSuite suite = new NbTestSuite(TransformServletTest.class);
64         
65         return suite;
66     }
67     
68         
69     /** Test of getServletURL method, of class org.netbeans.modules.xsl.transform.TransformServlet. */
70     public void testGetServletURL() {
71         System.out.println("testGetServletURL");
72         
73         URL servletURL = null;
74         boolean exceptionThrown = false;
75         try {
76             servletURL = TransformServlet.getServletURL();
77         } catch (Exception JavaDoc exc) {
78             System.err.println("!!! " + exc);
79             exceptionThrown = true;
80         }
81         
82         assertTrue ("I need correct Transform Servlet URL!", (servletURL!=null & exceptionThrown!= true));
83     }
84     
85 }
86
Popular Tags