public void IsDirty_AnyProprtyChanged_ReturnsTrue(string propertyName, object newValue) { HostEntry entry = new HostEntry(5, "original-line", " ", false, "hostname", "address", "comment"); entry.GetType().GetProperty(propertyName).SetValue(entry, newValue, null); Assert.IsTrue(entry.IsDirty); }
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)); }