Antmicro.OptionsParser.Tests.ValidationTests.ShouldThrowExceptionWhenRequiredParamterIsNotFound C# (CSharp) Метод

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

private ShouldThrowExceptionWhenRequiredParamterIsNotFound ( ) : void
Результат void
        public void ShouldThrowExceptionWhenRequiredParamterIsNotFound()
        {
            var args = new string[0];

            var parser = new OptionsParser(new ParserConfiguration { ThrowValidationException = true });
            var options = new OptionsWithRequiredParameter();

            try
            {
                parser.Parse(options, args);
                Assert.Fail("Expected exception");
            }
            catch (ValidationException)
            {
                // intentionally left blank
            }
        }