public void TestAddAge()
        {
            PersonViewModel viewModel = new PersonViewModel
                                            {
                                                Name = "Cheka",
                                                Age = 20
                                            };
            string changedPropertyName = null;
            viewModel.PropertyChanged += (sender, evtargs) => { changedPropertyName = evtargs.PropertyName; };

            viewModel.AgeAddCommand.Execute(null);

            Assert.AreEqual("Age", changedPropertyName);
            Assert.AreEqual(21, viewModel.Age);
        }
예제 #2
0
 public AddAgeCommand(PersonViewModel viewModel)
 {
     m_viewModel = viewModel;
 }
예제 #3
0
 public AddAgeCommand(PersonViewModel viewModel)
 {
     m_viewModel = viewModel;
 }