Example #1
0
 public void can_return_error_message_for_null_arguments()
 {
     var simple = new AnalysisOptions();
     var result = simple.CliParse(null);
 }
Example #2
0
        public void specific_issue_1()
        {
            var args = NativeMethods.CommandLineToArgs("/p c:\\Temp");
            var simple = new AnalysisOptions();
            var result = simple.CliParse(args);

            Assert.AreEqual(true, result.Successful);
            Assert.AreEqual(0, result.CliParseMessages.ToList().Count);
            Assert.AreEqual(false, result.ShowHelp);
            Assert.AreEqual("c:\\Temp", simple.Path);
        }
Example #3
0
        public void can_map_multiple_argument_by_implied_position()
        {
            var args = NativeMethods.CommandLineToArgs("blah 123 123");
            var simple = new AnalysisOptions();
            var result = simple.CliParse(args);

            Assert.AreEqual(false, result.Successful);
            Assert.AreEqual(1, result.CliParseMessages.ToList().Count);
            Assert.AreEqual(false, result.ShowHelp);

        }
Example #4
0
        public void sets_showhelp_to_false_when_no_arguments_supplied_and_showhelpwhennoargumentsprovided_is_false()
        {
            var args = NativeMethods.CommandLineToArgs("");
            var analysisOptions = new AnalysisOptions();
            var result = analysisOptions.CliParse(args);

            Assert.AreEqual(false, result.Successful);
            Assert.AreEqual(1, result.CliParseMessages.ToList().Count);
            Assert.AreEqual(false, result.ShowHelp);
        }