コード例 #1
0
        public void CorrectArgumentsAreSuccesfullyParsed()
        {
            var loggerMock = LoggerMockHelpers.CreateLoggerMock();

            var result = CommandLineOptions.Parse(CorrectArguments, loggerMock.Object);

            Assert.True(result.isSuccess);

            LoggerMockHelpers.AssertNothingWasWrittenToLog(loggerMock);
        }
コード例 #2
0
        public void ArgumentsAreCaseInsensitive()
        {
            var loggerMock = LoggerMockHelpers.CreateLoggerMock();

            var withUppercaseArgument = CorrectArguments.Select(arg => arg.Replace("--isPr=false", "--isPr=true")).ToArray();

            var result = CommandLineOptions.Parse(withUppercaseArgument, loggerMock.Object);

            Assert.True(result.isSuccess);
            Assert.True(result.options.IsPr);

            LoggerMockHelpers.AssertNothingWasWrittenToLog(loggerMock);
        }