public void BaseCommandInterpreter_CommandInterpretsHisOwnOpertion()
        {
            //Arrange
            var doc = A.Fake<IInputOutputDriver>();
            var sut = new TestCommandInterpreter(doc);

            //Act
            var res = sut.HandleCommand(Constants.TestKey);

            //Assert
            res.HasSucceed.Should().BeTrue();
            res.IsTerminating.Should().BeFalse();
        }
        public void BaseCommandInterpreter_ChainHandlesUnknownCommand()
        {
            //Arrange
            var doc = A.Fake<IInputOutputDriver>();
            var sut = new TestCommandInterpreter(doc);
            var anotherValue = Constants.AnotherKey;

            //Act
            var res = sut.HandleCommand(anotherValue);

            //Assert
            res.HasSucceed.Should().BeFalse();
            res.IsTerminating.Should().BeFalse();
            res.Message.Should().BeEquivalentTo(UI.Properties.Resources.CommandUnrecognized);
        }
        public void BaseCommandInterpreter_ChainCallsNextEvaluator()
        {
            //Arrange
            var doc = A.Fake<BaseCommandInterpreter>();
            var driver = A.Fake<IInputOutputDriver>();
            var sut = new TestCommandInterpreter(driver);
            sut.SetSuccessor(doc);
            var anotherValue = Constants.AnotherKey;

            //Act
            var dummy = sut.HandleCommand(anotherValue);

            //Assert
            A.CallTo(() => sut.Successor.HandleCommand(anotherValue)).MustHaveHappened(Repeated.Exactly.Once);
        }