ArgsTests.AllowUnexpectedArgsTests.AllowUnexpectedArgsBasic C# (CSharp) Méthode

AllowUnexpectedArgsBasic() private méthode

private AllowUnexpectedArgsBasic ( ) : void
Résultat void
        public void AllowUnexpectedArgsBasic()
        {
            var parsed = Args.Parse<SomeArgsWithAllowAttribute>("-dynamicArg", "dynamicValue");
            Assert.IsNull(parsed.AnArg);
            var ambientDefinition = Args.GetAmbientDefinition();
            Assert.AreEqual(1, ambientDefinition.UnexpectedExplicitArguments.Count);
            Assert.AreEqual(ambientDefinition.UnexpectedExplicitArguments["dynamicArg"], "dynamicValue");
        }