Ejemplo n.º 1
0
        private void ExecuteParsingTest(string arguments, bool shouldPass, Action <ApplicationOptions> assertions = null)
        {
            var options = new ApplicationOptions();

            if (shouldPass)
            {
                options = CommandLineParameters.ParseCommandLine(arguments.Split(' '));
                if (assertions != null)
                {
                    assertions(options);
                }
            }
            else
            {
                Assert.Throws <Exception>(() => CommandLineParameters.ParseCommandLine(arguments.Split(' ')));
            }
        }