Search in sources :

Example 6 with IssuerAttributeField

use of org.nhindirect.policy.x509.IssuerAttributeField in project nhin-d by DirectProject.

the class IssuerAttributeField_injectReferenceValueTest method testInjectRefereneValue_noInjection_getPolicyValue_assertException.

public void testInjectRefereneValue_noInjection_getPolicyValue_assertException() throws Exception {
    final IssuerAttributeField field = new IssuerAttributeField(true, RDNAttributeIdentifier.COMMON_NAME);
    boolean exceptionOccured = false;
    try {
        field.getPolicyValue();
    } catch (IllegalStateException e) {
        exceptionOccured = true;
    }
    assertTrue(exceptionOccured);
}
Also used : IssuerAttributeField(org.nhindirect.policy.x509.IssuerAttributeField)

Aggregations

IssuerAttributeField (org.nhindirect.policy.x509.IssuerAttributeField)6 X509Certificate (java.security.cert.X509Certificate)4 IOException (java.io.IOException)1 PolicyGrammarException (org.nhindirect.policy.PolicyGrammarException)1 PolicyParseException (org.nhindirect.policy.PolicyParseException)1 PolicyRequiredException (org.nhindirect.policy.PolicyRequiredException)1 RDNAttributeIdentifier (org.nhindirect.policy.x509.RDNAttributeIdentifier)1 SubjectAttributeField (org.nhindirect.policy.x509.SubjectAttributeField)1 TBSFieldName (org.nhindirect.policy.x509.TBSFieldName)1