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

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

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

            parser.Parse(args);

            Assert.AreEqual(1, parser.ParsedOptions.Count());
            Assert.AreEqual('c', parser.ParsedOptions.First().Flag.ShortName);

            Assert.AreEqual(2, parser.UnexpectedArguments.Count());
            Assert.AreEqual("x", parser.UnexpectedArguments.ElementAt(0).Value);
            Assert.AreEqual("value with whitespace", parser.UnexpectedArguments.ElementAt(1).Value);
        }