public void will_update_IsDirty_property_if_and_only_if_real_changes_are_made() { var hostFile = new HostsFile(); hostFile.Set("127.0.0.1", "test.com"); Assert.True(hostFile.IsDirty); hostFile.MarkClean(); hostFile.Set("127.0.0.1", "test1.com"); Assert.True(hostFile.IsDirty); hostFile.MarkClean(); hostFile.Set("127.0.0.1", "test1.com"); Assert.False(hostFile.IsDirty); }
public void will_update_IsDirty_property_if_and_only_if_real_changes_are_made() { var hostFile = new HostsFile(); hostFile.Set("127.0.0.1", "test.com"); hostFile.MarkClean(); hostFile.Remove("test1.com"); Assert.False(hostFile.IsDirty); hostFile.Remove("test.com"); Assert.True(hostFile.IsDirty); }