public void TestAtCanExecuteReturnererFalseHvisCanExecuteOnCommandsReturnererFalse()
        {
            var fixture = new Fixture();

            fixture.Customize <ICommand>(e => e.FromFactory(() =>
            {
                var mock = MockRepository.GenerateMock <ICommand>();
                mock.Expect(m => m.CanExecute(Arg <object> .Is.Anything))
                .Return(false)
                .Repeat.Any();
                return(mock);
            }));

            var commandMockCollection = fixture.CreateMany <ICommand>(25).ToList();

            Assert.That(commandMockCollection, Is.Not.Null);
            Assert.That(commandMockCollection, Is.Not.Empty);

            var command = new CommandCollectionExecuterCommand(commandMockCollection);

            Assert.That(command, Is.Not.Null);

            var parameter = fixture.Create <object>();
            var result    = command.CanExecute(parameter);

            Assert.That(result, Is.False);

            foreach (var commandMock in commandMockCollection)
            {
                commandMock.AssertWasCalled(m => m.CanExecute(Arg <object> .Is.Equal(parameter)));
            }
        }
        public void TestAtCanExecuteReturnererFalseHvisCommandCollectionErEmpty()
        {
            var fixture = new Fixture();

            var commandMockCollection = new List <ICommand>(0);

            Assert.That(commandMockCollection, Is.Not.Null);
            Assert.That(commandMockCollection, Is.Empty);

            var command = new CommandCollectionExecuterCommand(commandMockCollection);

            Assert.That(command, Is.Not.Null);

            Assert.That(command.CanExecute(fixture.Create <object>()), Is.False);
        }