예제 #1
0
        public void CanHandle_WithFirstParseResultSectionNotEqualToName_ReturnsNull()
        {
            ArrangeInputs(parseResultSections: "test name.txt",
                          out MockedShellState shellState,
                          out HttpState httpState,
                          out ICoreParseResult parseResult);

            RunCommand runCommand = new RunCommand(new MockedFileSystem());
            bool?      result     = runCommand.CanHandle(shellState, httpState, parseResult);

            Assert.Null(result);
        }
예제 #2
0
        public void CanHandle_WithValidInput_ReturnsTrue()
        {
            ArrangeInputs(parseResultSections: "run InputFileForRunCommand.txt",
                          out MockedShellState shellState,
                          out HttpState httpState,
                          out ICoreParseResult parseResult);

            RunCommand runCommand = new RunCommand(new MockedFileSystem());
            bool?      result     = runCommand.CanHandle(shellState, httpState, parseResult);

            Assert.True(result);
        }
예제 #3
0
        public void CanHandle_WithNoParseResultSections_ReturnsNull()
        {
            ArrangeInputs(parseResultSections: string.Empty,
                          out MockedShellState shellState,
                          out HttpState httpState,
                          out ICoreParseResult parseResult);

            RunCommand runCommand = new RunCommand(new MockedFileSystem());
            bool?      result     = runCommand.CanHandle(shellState, httpState, parseResult);

            Assert.Null(result);
        }