Ejemplo n.º 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");
		}
Ejemplo n.º 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");
        }