示例#1
0
		public void Should_throw_if_property_not_found()
		{
			var vm = new ViewModel();
			Assert.Throws<ArgumentException>(() => vm.ThirdProperty = "");
		}
示例#2
0
		public void Should_notify_when_property_changed()
		{
			var vm = new ViewModel();
			vm.PropertyChanged += (sender, args) => Console.WriteLine("Property changed: " + args.PropertyName);
			vm.FirstProperty = "value";
		}
示例#3
0
		public void Should_notify_when_property_changed_with_lambda_expression()
		{
			var vm = new ViewModel();
			vm.PropertyChanged += (sender, args) => Console.WriteLine("Property changed: " + args.PropertyName);
			vm.SecondProperty= "value";
		}