Antmicro.OptionsParser.Tests.ParserTests.ShouldParseOptionValueWithHyphen C# (CSharp) Метод

ShouldParseOptionValueWithHyphen() приватный Метод

private ShouldParseOptionValueWithHyphen ( ) : void
Результат void
        public void ShouldParseOptionValueWithHyphen()
        {
            var args = new [] { "-c", "value-with-hyphen" };
            var parser = new OptionsParser();
            parser.WithOption<string>('c');

            parser.Parse(args);

            Assert.AreEqual(1, parser.ParsedOptions.Count());
            Assert.AreEqual('c', parser.ParsedOptions.First().Flag.ShortName);
            Assert.AreEqual("value-with-hyphen", parser.ParsedOptions.First().Value);

            Assert.AreEqual(0, parser.UnexpectedArguments.Count());
        }