Пример #1
0
        public void GetSubsequentCommands_ReturnsVerboseCommands()
        {
            var subsequentCommands = DecoratorCommand.GetSubsequentCommands().ToArray();

            Assert.That(subsequentCommands, Is.Not.Empty);
            Assert.That(subsequentCommands, Is.All.TypeOf <VerboseCommandDecorator>());
        }
Пример #2
0
        public void GetSubsequentCommands_GivenDecoratorCommandExecuted_YieldsRewardCommandAndSubsequentCommandsFromDecoratedCommand()
        {
            DecoratorCommand.Execute();

            var commandsResultingFromExecutionOfRewardDecorator = DecoratorCommand.GetSubsequentCommands();

            Assert.That(
                commandsResultingFromExecutionOfRewardDecorator,
                Is.EqualTo(RewardCommands.Concat(AdditionalCommandsProducedByDecoratedCommand)));
        }