示例#1
0
 public void RunExecute()
 {
     var sample = new SampleViewModel();
     var property = sample.GetType().GetProperty("TickCommand");
     var command = (ICommand) property.GetValue(sample);
     command.Execute(null); 
     command.Execute(null);
     Assert.That(sample.Ticks, Is.EqualTo(2));
 }
示例#2
0
        public void RunExecute()
        {
            var sample   = new SampleViewModel();
            var property = sample.GetType().GetProperty("TickCommand");
            var command  = (ICommand)property.GetValue(sample);

            command.Execute(null);
            command.Execute(null);
            Assert.That(sample.Ticks, Is.EqualTo(2));
        }