XPPWriterTest.java 1.22 KB
Newer Older
Bill Lynch's avatar
Bill Lynch committed
1 2 3 4 5
/**
 * $RCSfile$
 * $Revision$
 * $Date$
 *
6
 * Copyright (C) 2004-2008 Jive Software. All rights reserved.
Bill Lynch's avatar
Bill Lynch committed
7
 *
8 9 10
 * This software is published under the terms of the GNU Public License (GPL),
 * a copy of which is included in this distribution, or a commercial license
 * agreement with Jive.
Bill Lynch's avatar
Bill Lynch committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
 */
package org.jivesoftware.util;

import junit.framework.TestCase;

/**
 * <p>Test the writing of dom4j documents using the XPP serializer.</p>
 *
 * @author Iain Shigeoka
 */
public class XPPWriterTest extends TestCase {
    /**
     * <p>Create a new test with the given name.</p>
     *
     * @param name The name of the test
     */
    public XPPWriterTest(String name){
        super(name);
    }

    /**
     * <p>Run a standard config document through a round trip and compare.</p>
     */
    public void testRoundtrip(){
Bill Lynch's avatar
Bill Lynch committed
35 36
        // NOTE: disabling this test case until we get resources working again.
        /*
Bill Lynch's avatar
Bill Lynch committed
37
        try {
38
            Document doc = XPPReader.parseDocument(new FileReader("../conf/openfire.xml"),this.getClass());
Bill Lynch's avatar
Bill Lynch committed
39
            XPPWriter.write(doc, new FileWriter("../conf/xmpp_writer_test_copy.xml"));
Bill Lynch's avatar
Bill Lynch committed
40 41 42 43
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
Bill Lynch's avatar
Bill Lynch committed
44
        */
Bill Lynch's avatar
Bill Lynch committed
45 46
    }
}