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

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