Пример #1
0
        public void required_and_unknown_property_checking()
        {
            var args = NativeMethods.CommandLineToArgs("-r c:\\Temp");
            var simple = new RequiredCli();
            var result = simple.CliParse(args);

            Assert.AreEqual(false, result.Successful);
            Assert.AreEqual(3, result.CliParseMessages.ToList().Count);
            Assert.AreEqual(false, result.ShowHelp);
        }
Пример #2
0
        public void enforces_required_fields()
        {
            var args = NativeMethods.CommandLineToArgs("");
            var cli = new RequiredCli();
            var result = cli.CliParse(args);

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