assertTrue(choice.throwExceptionOnDefault());
}
public void testAddWrongChoice() {
MappingChoiceNode choice = new MappingChoiceNode();
try {
choice.addAllNode(new MappingAllNode());
fail("must have failed to add"); //$NON-NLS-1$
}catch(RuntimeException e) {
}
try {
choice.addSequenceNode(new MappingSequenceNode());
fail("must have failed to add"); //$NON-NLS-1$
}catch(RuntimeException e) {
}
try {
choice.addChildElement(new MappingElement("foo")); //$NON-NLS-1$
fail("must have failed to add"); //$NON-NLS-1$
}catch(RuntimeException e) {
}
try {
choice.addChoiceNode(new MappingChoiceNode());
fail("must have failed to add"); //$NON-NLS-1$
}catch(RuntimeException e) {
}
}