Search in sources :

Example 6 with XMLLexiconPolicyParser

use of org.nhindirect.policy.impl.XMLLexiconPolicyParser in project nhin-d by DirectProject.

the class XMLLexiconPolicyParser_serializeTest method testSerialize_nullStream_assertExecption.

public void testSerialize_nullStream_assertExecption() throws Exception {
    boolean exceptionOccured = false;
    final XMLLexiconPolicyParser parser = new XMLLexiconPolicyParser();
    try {
        parser.serialize(mock(PolicyExpression.class), null);
    } catch (IllegalArgumentException e) {
        exceptionOccured = true;
    }
    assertTrue(exceptionOccured);
}
Also used : LiteralPolicyExpression(org.nhindirect.policy.LiteralPolicyExpression) PolicyExpression(org.nhindirect.policy.PolicyExpression) OperationPolicyExpression(org.nhindirect.policy.OperationPolicyExpression) XMLLexiconPolicyParser(org.nhindirect.policy.impl.XMLLexiconPolicyParser)

Aggregations

XMLLexiconPolicyParser (org.nhindirect.policy.impl.XMLLexiconPolicyParser)6 LiteralPolicyExpression (org.nhindirect.policy.LiteralPolicyExpression)3 OperationPolicyExpression (org.nhindirect.policy.OperationPolicyExpression)3 PolicyExpression (org.nhindirect.policy.PolicyExpression)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 Vector (java.util.Vector)2 ExtendedKeyUsageExtensionField (org.nhindirect.policy.x509.ExtendedKeyUsageExtensionField)2 KeyUsageExtensionField (org.nhindirect.policy.x509.KeyUsageExtensionField)2 PolicyParseException (org.nhindirect.policy.PolicyParseException)1