public void GetProperty_WithFactory_ShouldReturnCorrectValue( SampleBindable sut, string expected) { //arrange //act var actual = sut.GetPropertyWithFactory(() => expected); //assert actual.Should().Be(expected); }
public void SetProperty_WithSameValue_ShouldNotRaiseNotifyPropertyChanged( SampleBindable sut, string value1) { //arrange sut.Property = value1; sut.MonitorEvents(); //act sut.Property = value1; //assert sut.ShouldNotRaise("PropertyChanged"); }
public void SetProperty_WithSameValue_ShouldNotRaiseNotifyPropertyChanged( SampleBindable sut, string value1) { //arrange sut.Property = value1; sut.MonitorEvents(); //act sut.Property = value1; //assert sut.ShouldNotRaise("PropertyChanged"); }
public void SetProperty_WithNewValue_ShouldRaiseNotifyPropertyChanged( SampleBindable sut, string value1, string value2) { //arrange sut.Property = value1; sut.MonitorEvents(); //act sut.Property = value2; //assert sut.ShouldRaise("PropertyChanged").WithArgs<PropertyChangedEventArgs>(arg => arg.PropertyName == "Property"); }
public void SetProperty_WithNewValue_ShouldRaiseNotifyPropertyChanged( SampleBindable sut, string value1, string value2) { //arrange sut.Property = value1; sut.MonitorEvents(); //act sut.Property = value2; //assert sut.ShouldRaise("PropertyChanged").WithArgs <PropertyChangedEventArgs>(arg => arg.PropertyName == "Property"); }
public void Invalidate_ShouldResetValue( SampleBindable sut, string value1, object value2) { //arrange sut.Property = value1; sut.Property2 = value2; //act sut.CallInvalidate(() => sut.Property, () => sut.Property2); //assert sut.Property.Should().Be(default(string)); sut.Property2.Should().Be(default(object)); }
public void Invalidate_ShouldResetValue( SampleBindable sut, string value1, object value2) { //arrange sut.Property = value1; sut.Property2 = value2; //act sut.CallInvalidate(() => sut.Property, () => sut.Property2); //assert sut.Property.Should().Be(default(string)); sut.Property2.Should().Be(default(object)); }
public void TestProperty( SampleBindable sut, WritablePropertyAssertion assertion) { assertion.VerifyProperty(() => sut.Property); }
public void GetProperty_WithFactory_ShouldReturnCorrectValue( SampleBindable sut, string expected) { //arrange //act var actual = sut.GetPropertyWithFactory(() => expected); //assert actual.Should().Be(expected); }
public void TestProperty( SampleBindable sut, WritablePropertyAssertion assertion) { assertion.VerifyProperty(() => sut.Property); }