public void TestIsCritical_CertMission_AssertException()
        {
            var field = new BasicContraintsExtensionField(false);

            Action action = () => field.IsCritical();

            action.ShouldThrow <InvalidOperationException>();
        }
 public void TestIsCritical_ExtensionPresent_IsCritical_AssertTrue()
 {
     var cert = new X509Certificate2(@"resources/certs/CernerDirect DevCert Provider CA.der");
     cert.GetCriticalExtensionOIDs().Should().Contain(ExtensionIdentifier.BasicConstraints.Id);
     var field = new BasicContraintsExtensionField(false);
     field.InjectReferenceValue(cert);
     field.IsCritical().Should().BeTrue();
 }
        public void TestIsCritical_CertMission_AssertException()
        {

            var field = new BasicContraintsExtensionField(false);
           
            Action action = () => field.IsCritical();
            action.ShouldThrow<InvalidOperationException>();

        }
        public void TestIsCritical_ExtensionPresent_IsCritical_AssertTrue()
        {
            var cert = new X509Certificate2(@"resources/certs/CernerDirect DevCert Provider CA.der");

            cert.GetCriticalExtensionOIDs().Should().Contain(ExtensionIdentifier.BasicConstraints.Id);
            var field = new BasicContraintsExtensionField(false);

            field.InjectReferenceValue(cert);
            field.IsCritical().Should().BeTrue();
        }