use of org.nhindirect.policy.PolicyRequiredException in project nhin-d by DirectProject.
the class CertificatePolicyIndentifierExtensionField_injectReferenceValueTest method testInjectRefereneValue_policyDoesNotExist_required_assertException.
public void testInjectRefereneValue_policyDoesNotExist_required_assertException() throws Exception {
final X509Certificate cert = TestUtils.loadCertificate("altNameOnly.der");
final CertificatePolicyIndentifierExtensionField field = new CertificatePolicyIndentifierExtensionField(true);
boolean exceptionOccured = false;
try {
field.injectReferenceValue(cert);
} catch (PolicyRequiredException e) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.policy.PolicyRequiredException in project nhin-d by DirectProject.
the class ExtendedKeyUsageExtensionField_injectReferenceValueTest method testInjectRefereneValue_extendedKeyUsageDoesNotExist_required_assertException.
public void testInjectRefereneValue_extendedKeyUsageDoesNotExist_required_assertException() throws Exception {
final X509Certificate cert = TestUtils.loadCertificate("altNameOnly.der");
final ExtendedKeyUsageExtensionField field = new ExtendedKeyUsageExtensionField(true);
boolean exceptionOccured = false;
try {
field.injectReferenceValue(cert);
} catch (PolicyRequiredException e) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.policy.PolicyRequiredException in project nhin-d by DirectProject.
the class IssuerAttributeField_injectReferenceValueTest method testInjectRefereneValue_rdnAttributeDoesNotExist_required_throwException.
public void testInjectRefereneValue_rdnAttributeDoesNotExist_required_throwException() throws Exception {
final X509Certificate cert = TestUtils.loadCertificate("altNameOnly.der");
final IssuerAttributeField field = new IssuerAttributeField(true, RDNAttributeIdentifier.INITIALS);
boolean exceptionOccured = false;
try {
field.injectReferenceValue(cert);
} catch (PolicyRequiredException e) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.policy.PolicyRequiredException in project nhin-d by DirectProject.
the class KeyUsageExtensionField_injectReferenceValueTest method testInjectRefereneValue_keyUsageDoesNotExist_required_assertException.
public void testInjectRefereneValue_keyUsageDoesNotExist_required_assertException() throws Exception {
final X509Certificate cert = TestUtils.loadCertificate("altNameOnly.der");
final KeyUsageExtensionField field = new KeyUsageExtensionField(true);
boolean exceptionOccured = false;
try {
field.injectReferenceValue(cert);
} catch (PolicyRequiredException e) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.policy.PolicyRequiredException in project nhin-d by DirectProject.
the class CRLDistributionPointNameExtentionField_injectReferenceValueTest method testInjectRefereneValue_crlPointDoesNotExist_required_assertException.
public void testInjectRefereneValue_crlPointDoesNotExist_required_assertException() throws Exception {
final X509Certificate cert = TestUtils.loadCertificate("altNameOnly.der");
final CRLDistributionPointNameExtentionField field = new CRLDistributionPointNameExtentionField(true);
boolean exceptionOccured = false;
try {
field.injectReferenceValue(cert);
} catch (PolicyRequiredException e) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
Aggregations