assertFalse(doc.isFormatted());
assertEquals("UTF-16", doc.getDocumentEncoding()); //$NON-NLS-1$
}
public void testDoc3() {
MappingDocument doc = new MappingDocument("UTF-16", false); //$NON-NLS-1$
MappingElement root = new MappingElement("test"); //$NON-NLS-1$
root.setMinOccurrs(2);
root.setMaxOccurrs(-1);
doc.addChildElement(root);
assertNotNull(doc.getRootNode());
assertFalse(doc.isFormatted());
assertEquals("UTF-16", doc.getDocumentEncoding()); //$NON-NLS-1$
// the root can not re-occur more than once..
root = (MappingElement)doc.getRootNode();
assertEquals(1, root.getMinOccurence());
assertEquals(1, root.getMaxOccurence());
}