Commit 1fadb5c3 authored by Bill Lynch's avatar Bill Lynch Committed by bill

Initial checkin - quick sanity check test


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@249 b35dd754-fafc-0310-a699-88a17e54d16e
parent d77e811a
/**
* $RCSfile$
* $Revision
* $Date$
*
* Copyright (C) 1999-2004 Jive Software. All rights reserved.
*
* This software is the proprietary information of Jive Software. Use is subject to license terms.
*/
package org.jivesoftware.util;
import junit.framework.TestCase;
import java.io.ByteArrayInputStream;
public class XMLPropertiesTest extends TestCase {
public void testAttributes() throws Exception {
String xml = "<root><foo></foo></root>";
XMLProperties props = new XMLProperties(new ByteArrayInputStream(xml.getBytes()));
assertNull(props.getAttribute("foo","bar"));
xml = "<root><foo bar=\"test123\"></foo></root>";
props = new XMLProperties(new ByteArrayInputStream(xml.getBytes()));
assertEquals(props.getAttribute("foo","bar"), "test123");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment