public void testValidNamespaceAttributes() { EncryptionProperty encProp = (EncryptionProperty) target; QName attribName = new QName(XMLConstants.XML_NS, "lang", XMLConstants.XML_PREFIX); encProp.getUnknownAttributes().put(attribName, "en-US"); assertValidationPass( "EncryptionProperty contained an attribute from the XML namespace, should have passed validation"); }
public void testInvalidNamespaceAttributes() { EncryptionProperty encProp = (EncryptionProperty) target; QName attribName = new QName("urn:namespace:foo", "FooAttrib", "foo"); encProp.getUnknownAttributes().put(attribName, "foobar"); assertValidationFail( "EncryptionProperty contained an attribute with an invalid namespace, should have failed validation"); }
public void testInvalidNamespaceChildren() { EncryptionProperty encProp = (EncryptionProperty) target; SimpleXMLObjectBuilder sxoBuilder = new SimpleXMLObjectBuilder(); SimpleXMLObject sxo = sxoBuilder.buildObject(XMLConstants.XMLENC_NS, "Foo", XMLConstants.XMLENC_PREFIX); encProp.getUnknownXMLObjects().add(sxo); assertValidationFail( "EncryptionProperty contained a child with an invalid namespace, should have failed validation"); }
public void testMissingChildren() { EncryptionProperty encProp = (EncryptionProperty) target; encProp.getUnknownXMLObjects().clear(); assertValidationFail("EncryptionProperty child list was empty, should have failed validation"); }
protected void populateRequiredData() { super.populateRequiredData(); EncryptionProperty encProp = (EncryptionProperty) target; encProp.getUnknownXMLObjects().add(buildXMLObject(simpleXMLObjectQName)); }