*/
public void testSimpleNamespaces()
{
String configString = createXml(TEST_SIMPLE_NAMESPACES);
InputStream reader = new ByteArrayInputStream(configString.getBytes());
XmlReader xmlReader = null;
XmlIOConfig config = XmlIOConfig.getInstance();
try
{
NamespaceMap map = new NamespaceMap();
map.setUri("http://www.bifrost.org/xmlio");
map.setPrefix("helpers");
map.setPackageName("org.bifrost.xmlio.test.helpers");
config.addNamespaceMap(map);
xmlReader = new XmlReader(reader, "");
}
catch (XmlException e)
{
fail("Unexpected error: " + e.toString());
}
assertNotNull(xmlReader);
TestHelperSimple helper = (TestHelperSimple)xmlReader.getRootObject();
assertNotNull(helper);
assertTrue(helper.getNumber() == 123);
assertTrue("abc".equals(helper.getString()));
} // end testSimpleObject()