public void Given_any_INPC_implementation_converted_to_NC_When_I_change_converted_property_Then_converted_value_should_change() { // Arrange var model = new CustomModel(); var count = model.GetNotifyChangeOfProperty(x => x.Count); // Act model.Count = 1; // Assert count.Value.Should().Be(1); }
public void Given_any_INPC_implementation_converted_to_NC_When_I_change_converted_property_Then_converted_value_should_change() { // Arrange var model = new CustomModel(); var count = model.GetNotifyChangeOfProperty(x => x.Count); // Act model.Count = 1; // Assert count.Value.Should().Be(1); }
public void Given_any_INPC_implementation_converted_to_NC_When_I_change_not_converted_property_Then_NC_should_not_raise_PC() { // Arrange var model = new CustomModel(); var count = model.GetNotifyChangeOfProperty(x => x.Count); var raised = false; count.PropertyChanged += (sender, args) => raised = true; // Act model.Message = "hey"; // Assert raised.Should().BeFalse(); }
public void Given_any_INPC_implementation_converted_to_NC_When_I_change_not_converted_property_Then_NC_should_not_raise_PC() { // Arrange var model = new CustomModel(); var count = model.GetNotifyChangeOfProperty(x => x.Count); var raised = false; count.PropertyChanged += (sender, args) => raised = true; // Act model.Message = "hey"; // Assert raised.Should().BeFalse(); }