Exemplo n.º 1
0
        public void WhenPropertyGetterIsCalled_ItShouldNotBeIntercepted()
        {
            int zip = ViewModel.ZipCode;

            zip.Should().Be(0);
            LastPropertyToChange.Should().BeNull();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
 public void WhenValueAssignedIsTheSameAsTheCurrentValue_ItShouldNotNotify()
 {
     ViewModel.ZipCode = 0;
     LastPropertyToChange.Should().BeNull();
 }
Exemplo n.º 4
0
 public void WhenPropertyHasDoNotNotifyAttribute_ChangNotificationIsSuppressed()
 {
     this.ViewModel.DoNotNotifyChanges = "...";
     LastPropertyToChange.Should().BeNull();
 }
Exemplo n.º 5
0
 public void WhenValueChangesOnPropertyWithoutNotifyAttribute_ItShouldNotifyChanges()
 {
     this.ViewModel.Address = "123 Main Street";
     LastPropertyToChange.Should().Be("Address");
 }
Exemplo n.º 6
0
        public void WhenValueChangesOnPropertyWithoutNotifyAttribute_ItShouldNotNotify()
        {
            ViewModel.Address = "123 Main Street";

            LastPropertyToChange.Should().BeNull();
        }