예제 #1
0
		public void ItShouldAddThePassedInCommandAsAnAction(ICommandChannel commandChannel, Command command, State sut)
		{
			// Arrange

			// Act
			sut.AddAction(command);

			sut.ExecuteActions(commandChannel);

			// Assert
			A.CallTo(() => commandChannel.Send(command.Code)).MustHaveHappened(Repeated.Exactly.Once);
		}
예제 #2
0
        public void ExecuteActions(ICommandChannel commandChannel)
        {
            if (commandChannel == null) throw new ArgumentNullException("commandChannel");

            foreach (var action in _actions)
            {
                commandChannel.Send(action.Code);
            }
        }