public void FirstCanCommand_CheckCanTestCase()
        {
            List <object> list = new List <object>();

            FirstCanCommand firstCanCommand = new FirstCanCommand(
                e => list.Add(new object()),
                () => false);

            for (int i = 0; i < 2; i++)
            {
                if (firstCanCommand.CanExecute(null))
                {
                    firstCanCommand.Execute(null);
                }
            }

            Assert.AreEqual(1, list.Count, "collection must have 1 element");
        }
        public void FirstCanCommand_P_CheckCanTestCase()
        {
            List <object> list = new List <object>();
            object        obj  = new object();

            FirstCanCommand <object> firstCanCommand = new FirstCanCommand <object>(
                e => list.Add(e.CommandParam),
                _ => false);

            for (int i = 0; i < 2; i++)
            {
                if (firstCanCommand.CanExecute(obj))
                {
                    firstCanCommand.Execute(obj);
                }
            }

            Assert.AreEqual(1, list.Count, "collection must have 1 element");
            Assert.AreEqual(obj, list[0], "expected other value");
        }