Пример #1
0
        public void Get_Usage_Via_Interface_Should_Be_Valid()
        {
            SimpleRequiredConfig     oConfig = new SimpleRequiredConfig();
            ConsoleCommandLineParser oParser = new ConsoleCommandLineParser();

            string expected = @"SYNTAX:
  Unit Test /required1 | --required-option1 <option>
            /required2 | --required-option2 <option>
            [/optional | --optional-option <option>]

OPTIONS:
  /required1 | --required-option1     Example required option #1
  /optional | --optional-option       Example optional option
  /required2 | --required-option2     Example required option #2
";

            string actual = oParser.GetUsage(oConfig, "Unit Test");

            Assert.AreEqual(expected, actual);
        }