Exemplo n.º 1
0
        public void ExecuteInvokeAction()
        {
            var invoked = false;
            var command = new RelayCommand(obj => invoked = true);

            command.Execute();

            Assert.IsTrue(invoked);
        }
Exemplo n.º 2
0
        public void ExecuteOverloadInvokeActionWithParameter()
        {
            var invoked = false;
            var command = new RelayCommand(obj =>
            {
                Assert.IsNotNull(obj);
                invoked = true;
            });

            command.Execute(new object());
            Assert.IsTrue(invoked);
        }