Beispiel #1
0
 public void IsSelfIssued_WithRootCertificate_ReturnsTrue()
 {
     using (var certificate = _fixture.GetRootCertificate())
     {
         Assert.True(CertificateUtility.IsSelfIssued(certificate));
     }
 }
Beispiel #2
0
 public void IsSelfIssued_WithPartialChain_ReturnsFalse()
 {
     using (var certificate = SigningTestUtility.GetCertificate("leaf.crt"))
     {
         Assert.False(CertificateUtility.IsSelfIssued(certificate));
     }
 }
Beispiel #3
0
 public void IsSelfIssued_WithNonSelfSignedCertificate_ReturnsFalse()
 {
     using (var certificate = _fixture.GetNonSelfSignedCertificate())
     {
         Assert.False(CertificateUtility.IsSelfIssued(certificate));
     }
 }
Beispiel #4
0
        public void IsSelfIssued_WhenCertificateNull_Throws()
        {
            var exception = Assert.Throws <ArgumentNullException>(
                () => CertificateUtility.IsSelfIssued(certificate: null));

            Assert.Equal("certificate", exception.ParamName);
        }