Example #1
0
        public void Equals_SameValues_ReturnsTrue()
        {
            HostEntry entryA = new HostEntry(5, null, "    ", false, "hostname", "address", "comment");
            HostEntry entryB = new HostEntry(5, null, "    ", false, "hostname", "address", "comment");

            Assert.IsTrue(entryA.Equals(entryB));
        }
Example #2
0
        public void Equals_DifferentProperty_ReturnsFalse(string propertyName, object newValue)
        {
            HostEntry entryA = new HostEntry(5, null, "    ", false, "hostname", "address", "comment");
            HostEntry entryB = new HostEntry(5, null, "    ", false, "hostname", "address", "comment");

            entryB.GetType().GetProperty(propertyName).SetValue(entryB, newValue, null);

            Assert.IsFalse(entryA.Equals(entryB));
        }