Пример #1
0
        public void CanHandle_WithSecondParseResultSectionNotEqualToSubCommand_ReturnsNull()
        {
            ArrangeInputs(parseResultSections: "set header name",
                          out MockedShellState shellState,
                          out HttpState httpState,
                          out ICoreParseResult parseResult);

            SetBaseCommand setBaseCommand = new SetBaseCommand();
            bool?          result         = setBaseCommand.CanHandle(shellState, httpState, parseResult);

            Assert.Null(result);
        }
Пример #2
0
        public void CanHandle_WithValidInput_ReturnsTrue()
        {
            ArrangeInputs(parseResultSections: "set base \"https://localhost:44366/\"",
                          out MockedShellState shellState,
                          out HttpState httpState,
                          out ICoreParseResult parseResult);

            SetBaseCommand setBaseCommand = new SetBaseCommand();
            bool?          result         = setBaseCommand.CanHandle(shellState, httpState, parseResult);

            Assert.True(result);
        }
Пример #3
0
        public void CanHandle_WithParseResultSectionsLessThanTwo_ReturnsNull()
        {
            ArrangeInputs(parseResultSections: "set",
                          out MockedShellState shellState,
                          out HttpState httpState,
                          out ICoreParseResult parseResult);

            SetBaseCommand setBaseCommand = new SetBaseCommand();
            bool?          result         = setBaseCommand.CanHandle(shellState, httpState, parseResult);

            Assert.Null(result);
        }