public void IsSelfIssued_WithRootCertificate_ReturnsTrue() { using (var certificate = _fixture.GetRootCertificate()) { Assert.True(CertificateUtility.IsSelfIssued(certificate)); } }
public void IsSelfIssued_WithPartialChain_ReturnsFalse() { using (var certificate = SigningTestUtility.GetCertificate("leaf.crt")) { Assert.False(CertificateUtility.IsSelfIssued(certificate)); } }
public void IsSelfIssued_WithNonSelfSignedCertificate_ReturnsFalse() { using (var certificate = _fixture.GetNonSelfSignedCertificate()) { Assert.False(CertificateUtility.IsSelfIssued(certificate)); } }
public void IsSelfIssued_WhenCertificateNull_Throws() { var exception = Assert.Throws <ArgumentNullException>( () => CertificateUtility.IsSelfIssued(certificate: null)); Assert.Equal("certificate", exception.ParamName); }