Esempio n. 1
0
        public void TestRaiseProperty()
        {
            var    viewmodel     = new TestViewModel();
            String rPropertyName = null;

            viewmodel.PropertyChanged += (s, e) => rPropertyName = e.PropertyName;

            viewmodel.CallRaisePropertyChanged("TestProperty");
            Assert.Equal("TestProperty", rPropertyName);

            rPropertyName = null;
            viewmodel.CallRaisePropertyChanged(() => viewmodel.PropertyOne);
            Assert.Equal("PropertyOne", rPropertyName);
        }