Example #1
0
        public async Task SetCommandHandlerDefaultConfigurationHasDefinedVariables()
        {
            var definedVariables = new[] { "border", "topkmap" };
            var setCommand = new SetCommand();
            var setCommandHandler = new SetCommandHandler(this.notificationService);

            (await setCommandHandler.Execute(setCommand)).Should().BeTrue();

            var output = this.notificationService.InfoString;
            foreach (var variable in definedVariables)
            {
                output.Should().Contain(variable);
            }

            // Set command appends a new line by default to end of output, hence + 1
            output.Split('\r').Length.Should().Be(definedVariables.Length + 1);
        }
Example #2
0
        public async Task SetCommandHandlerHasDefaultValueForBorderVariable()
        {
            var setCommand = new SetCommand { Args = "border" };
            var setCommandHandler = new SetCommandHandler(this.notificationService);

            (await setCommandHandler.Execute(setCommand)).Should().BeTrue();

            this.notificationService.InfoString.Should().Be("border = 1\r\n");
        }