示例#1
0
        public void TestAddressCollectionGetUntrusted()
        {
            DirectAddressCollection coll = BasicCollection();

            Assert.Equal(2, coll.GetUntrusted().Count());
            Assert.Equal(2, coll.GetTrusted(TrustEnforcementStatus.Unknown).Count());
        }
示例#2
0
        public void TestAddressCollectionGetTrusted()
        {
            DirectAddressCollection     coll    = BasicCollection();
            IEnumerable <DirectAddress> trusted = coll.GetTrusted();

            Assert.Equal(1, trusted.Count());
            Assert.Equal("tinymollitude.net", trusted.First().Host);
            Assert.Equal("sean+o'nolan", trusted.First().User);
        }
示例#3
0
 public void TestBasicAdddressCollectionCreate()
 {
     DirectAddressCollection coll = new DirectAddressCollection();
     Assert.False(coll.IsTrusted());
     Assert.Equal<string>("", coll.ToString());
     Assert.False(coll.IsTrusted(TrustEnforcementStatus.Failed));
     Assert.True(coll.GetCertificates().Count == 0);
     Assert.True(coll.Certificates.Count() == 0);
     Assert.True(coll.GetUntrusted().Count() == 0);
     Assert.True(coll.GetTrusted().Count() == 0);
     Assert.DoesNotThrow(() => coll.RemoveUntrusted());
 }
示例#4
0
        public void TestBasicAdddressCollectionCreate()
        {
            DirectAddressCollection coll = new DirectAddressCollection();

            Assert.False(coll.IsTrusted());
            Assert.Equal <string>("", coll.ToString());
            Assert.False(coll.IsTrusted(TrustEnforcementStatus.Failed));
            Assert.True(coll.GetCertificates().Count == 0);
            Assert.True(coll.Certificates.Count() == 0);
            Assert.True(coll.GetUntrusted().Count() == 0);
            Assert.True(coll.GetTrusted().Count() == 0);
            Assert.Null(Record.Exception(() => coll.RemoveUntrusted()));
        }