Example #1
0
		public void ChangeViewModelPropertyVerifyPropertyChangedEventIsRaisedUsingTheExpressionProperty()
		{
			var viewModel = new ViewModelWithExpressionOnPropertyChanged { Name = "Test" };

			string propertyName = null;
			viewModel.PropertyChanged += (s, e) => propertyName = e.PropertyName;

			viewModel.Name = "Test1";

			propertyName.Should().Be.EqualTo("Name");
		}
Example #2
0
        public void ChangeViewModelPropertyVerifyPropertyChangedEventIsRaisedUsingTheExpressionProperty()
        {
            var viewModel = new ViewModelWithExpressionOnPropertyChanged {
                Name = "Test"
            };

            string propertyName = null;

            viewModel.PropertyChanged += (s, e) => propertyName = e.PropertyName;

            viewModel.Name = "Test1";

            propertyName.Should().Be("Name");
        }