public void Pop_TwoCommandsWithIdleUpdate_AllCommandsExtracted() { // ARRANGE var command1 = new Mock <ICommand>().Object; var command2 = new Mock <ICommand>().Object; var commandManager = new QueueCommandManager(); // ACT commandManager.Push(command1); var factCommand1 = commandManager.Pop(); // Холостой Update. var idleCommand = commandManager.Pop(); // Вторая команда должна быть извлечена. commandManager.Push(command2); var factCommand2 = commandManager.Pop(); // ASSERT factCommand1.Should().Be(command1); idleCommand.Should().BeNull(); factCommand2.Should().Be(command2); }
public void Pop_FakeCommands2_AllCommandsExtracted() { // ARRANGE var commands = GetTwoCommands(); var commandManager = new QueueCommandManager(); foreach (var command in commands) { commandManager.Push(command); } // ACT AssertPopCommands(commands, commandManager); }