public void testInjectRefereneValue_noInjection_getPolicyValue_assertException() { var field = new SignatureAlgorithmField(); Action action = () => field.GetPolicyValue(); action.ShouldThrow <InvalidOperationException>(); }
public void testInjectReferenceValue_sha256RSA_assertAlgorithm() { var cert = new X509Certificate2(@"resources/certs/CernerDirect DevCert Provider CA.der"); var field = new SignatureAlgorithmField(); field.InjectReferenceValue(cert); field.GetPolicyValue().GetPolicyValue().Should().Be(SignatureAlgorithmIdentifier.SHA256RSA.OID); }
public void TestInjectRefereneValue_AiaDoesNotExist_NotRequired_AssertValueEmpty() { var cert = new X509Certificate2(@"resources/certs/altNameOnly.der"); var field = new SignatureAlgorithmField(); field.InjectReferenceValue(cert); field.GetPolicyValue().GetPolicyValue().Should().Be(SignatureAlgorithmIdentifier.SHA1RSA.OID); }
public void testInjectRefereneValue_noInjection_getPolicyValue_assertException() { var field = new SignatureAlgorithmField(); Action action = () => field.GetPolicyValue(); action.ShouldThrow<InvalidOperationException>(); }