public void Execute()
        {
            var i       = 0;
            var command = new ConditionRelayCommand(() => i++, _condition);

            command.Execute();
            Assert.AreEqual(1, i);
        }
        public void Execute()
        {
            var i       = 0;
            var command = new ConditionRelayCommand <int>(x => i = x, _condition);

            command.Execute(1);
            Assert.AreEqual(1, i);
        }
Beispiel #3
0
        public void Execute()
        {
            var i    = 0;
            var fake = new Fake {
                IsTrueOrNull = false
            };

            using var condition = new Condition(fake.ObservePropertyChangedSlim(x => x.IsTrueOrNull), () => fake.IsTrueOrNull);
            using var command   = new ConditionRelayCommand <int>(x => i = x, condition);
            command.Execute(1);
            Assert.AreEqual(1, i);
        }
        public void Execute()
        {
            var fake = new Fake {
                IsTrue = true
            };

            using var condition = new Condition(fake.ObservePropertyChangedSlim(x => x.IsTrue), () => fake.IsTrue);
            var i = 0;

            using var command = new ConditionRelayCommand(() => i++, condition);
            command.Execute();
            Assert.AreEqual(1, i);
        }