public void WhenPropertyGetterIsCalled_ItShouldNotBeIntercepted() { int zip = ViewModel.ZipCode; zip.Should().Be(0); LastPropertyToChange.Should().BeNull(); }
public void WhenValueAssignedIsTheSameAsTheCurrentComplexValue_ItShouldNotNotify() { var value = new ComplexType(); ComplexViewModel.Complex = value; // initialize LastPropertyToChange.Should().Be("Complex"); LastPropertyToChange = null; var newValue = new ComplexType(); ComplexViewModel.Complex = newValue; // test LastPropertyToChange.Should().BeNull(); }
public void WhenValueAssignedIsTheSameAsTheCurrentValue_ItShouldNotNotify() { ViewModel.ZipCode = 0; LastPropertyToChange.Should().BeNull(); }
public void WhenPropertyHasDoNotNotifyAttribute_ChangNotificationIsSuppressed() { this.ViewModel.DoNotNotifyChanges = "..."; LastPropertyToChange.Should().BeNull(); }
public void WhenValueChangesOnPropertyWithoutNotifyAttribute_ItShouldNotifyChanges() { this.ViewModel.Address = "123 Main Street"; LastPropertyToChange.Should().Be("Address"); }
public void WhenValueChangesOnPropertyWithoutNotifyAttribute_ItShouldNotNotify() { ViewModel.Address = "123 Main Street"; LastPropertyToChange.Should().BeNull(); }