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)); }
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)); }