* @throws IOException
*/
public void testNoNamespaceSchemaLocation() throws IOException
{
// load the xml document which has xsi:noNamespaceSchemaLocation and xsi:schemaLocation defined
XMLDocument doc = XMLHelper.INSTANCE.load(getClass().getResourceAsStream(TEST_XML_DOCUMENT));
// get the noNamespaceSchemaLocation
assertEquals(NNS_SCHEMA_LOCATION, doc.getNoNamespaceSchemaLocation());
// set the noNameSpaceSchemaLocation to another value and test to see if the value was set
doc.setNoNamespaceSchemaLocation(NNS_SET_LOCATION);
assertEquals(NNS_SET_LOCATION, doc.getNoNamespaceSchemaLocation());
// remove the noNameSpaceSchemaLocation and ensure it returns null
doc.setNoNamespaceSchemaLocation(null);
assertNull(doc.getNoNamespaceSchemaLocation());
// ensure changes to noNameSpaceSchemaLocation have not changed schemaLocation
assertEquals(NS1_SCHEMA_NAME + " " + NS1_SCHEMA_LOCATION + " " + NS2_SCHEMA_NAME + " " + NS2_SCHEMA_LOCATION, doc.getSchemaLocation());
}