KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > util > XPPWriterTest


1 /**
2  * $RCSfile: XPPWriterTest.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2004/11/09 19:50:00 $
5  *
6  * Copyright (C) 1999-2003 CoolServlets, Inc. All rights reserved.
7  *
8  * This software is the proprietary information of CoolServlets, Inc.
9  * Use is subject to license terms.
10  */

11 package org.jivesoftware.util;
12
13 import junit.framework.TestCase;
14 import org.dom4j.Document;
15
16 import java.io.FileReader JavaDoc;
17 import java.io.FileWriter JavaDoc;
18
19 /**
20  * <p>Test the writing of dom4j documents using the XPP serializer.</p>
21  *
22  * @author Iain Shigeoka
23  */

24 public class XPPWriterTest extends TestCase {
25     /**
26      * <p>Create a new test with the given name.</p>
27      *
28      * @param name The name of the test
29      */

30     public XPPWriterTest(String JavaDoc name){
31         super(name);
32     }
33
34     /**
35      * <p>Run a standard config document through a round trip and compare.</p>
36      */

37     public void testRoundtrip(){
38         // NOTE: disabling this test case until we get resources working again.
39
/*
40         try {
41             Document doc = XPPReader.parseDocument(new FileReader("../conf/jive-messenger.xml"),this.getClass());
42             XPPWriter.write(doc, new FileWriter("../conf/xmpp_writer_test_copy.xml"));
43         } catch (Exception e) {
44             e.printStackTrace();
45             fail(e.getMessage());
46         }
47         */

48     }
49 }
50
Popular Tags