public void TestAddressTrustStatusFailure() { DirectAddress addr = new DirectAddress("\"Eleanor Roosevelt\" <*****@*****.**>"); addr.Status = TrustEnforcementStatus.Failed; Assert.False(addr.IsTrusted(TrustEnforcementStatus.Success)); Assert.False(addr.IsTrusted(TrustEnforcementStatus.Unknown)); }
public void TestAddressTrustStatusSuccess() { DirectAddress addr = new DirectAddress("\"Eleanor Roosevelt\" <*****@*****.**>"); addr.Status = TrustEnforcementStatus.Success; Assert.True(addr.IsTrusted(TrustEnforcementStatus.Success)); }
public void TestBasicAddressCreate() { DirectAddress addr = new DirectAddress("*****@*****.**"); Assert.Null(addr.Certificates); Assert.False(addr.HasCertificates); Assert.Null(addr.TrustAnchors); Assert.False(addr.HasTrustAnchors); Assert.Equal<TrustEnforcementStatus>(TrustEnforcementStatus.Unknown, addr.Status); Assert.False(addr.IsTrusted(TrustEnforcementStatus.Success)); Assert.Equal<string>("eleanor", addr.User); Assert.Equal<string>("roosevelt.com", addr.Host); }
public void TestBasicAddressCreate() { DirectAddress addr = new DirectAddress("*****@*****.**"); Assert.Null(addr.Certificates); Assert.False(addr.HasCertificates); Assert.Null(addr.TrustAnchors); Assert.False(addr.HasTrustAnchors); Assert.Equal <TrustEnforcementStatus>(TrustEnforcementStatus.Unknown, addr.Status); Assert.False(addr.IsTrusted(TrustEnforcementStatus.Success)); Assert.Equal <string>("eleanor", addr.User); Assert.Equal <string>("roosevelt.com", addr.Host); }
static void VerifyTrusted(DirectAddress address, TrustEnforcementStatus minStatus) { Assert.True(address.IsTrusted(minStatus)); }