예제 #1
0
        public void CommandsList_NoCommands_ReturnsEmptyDictionary()
        {
            var commandMapper = new CoffeeCommander(_mockOutputGenerator.Object, new List <ICoffeeCommand>(),
                                                    _mockOutputWriter.Object);

            commandMapper.CoffeeCommands.Should().BeEmpty();
        }
예제 #2
0
        public CoffeeCommanderTest()
        {
            _mockOutputGenerator = new Mock <IOutputGenerator>();

            _mockOutputWriter = new Mock <IOutputWriter>();

            _mockCoffeeCommand = new Mock <ICoffeeCommand>();
            _mockCoffeeCommand.Setup(c => c.Name).Returns("first");

            _mockCoffeeCommand2 = new Mock <ICoffeeCommand>();
            _mockCoffeeCommand2.Setup(c => c.Name).Returns("second");

            _mockCoffeeCommand3 = new Mock <ICoffeeCommand>();
            _mockCoffeeCommand3.Setup(c => c.Name).Returns("third");

            var cc = new[]
            {
                _mockCoffeeCommand.Object,
                _mockCoffeeCommand2.Object,
                _mockCoffeeCommand3.Object
            };

            _coffeeCommander = new CoffeeCommander(_mockOutputGenerator.Object, cc, _mockOutputWriter.Object);
        }