Exemplo n.º 1
0
        public void HostEntry_Differences()
        {
            HostEntry a = new HostEntry("demo.de", "https");
            a.SetIP("1.1.1.1");
            a.SetRanking("C");
            a.SetFingerPrintCert("SHA1");
            a.SetExpirationDate(DateTime.Now.ToLongDateString());

            HostEntry b = new HostEntry("demo.de", "https");
            b.SetIP("1.1.1.2");
            b.SetRanking("C");
            b.SetFingerPrintCert("SHA1");
            b.SetExpirationDate(DateTime.Now.ToLongDateString());

            a.CheckDifferences(b);
            Assert.IsTrue(a.Differences.Count >= 2);
            Assert.IsTrue(a.HasDifference("IP"));
            Assert.IsTrue(a.HasDifference("URL"));
        }