public void ParseArguments()
 {
     Assert.DoesNotThrow(() => PrecompilationCommandLineParser.Parse(null, null));
     Assert.DoesNotThrow(() => PrecompilationCommandLineParser.Parse(new string[0], null));
     Assert.DoesNotThrow(() => PrecompilationCommandLineParser.Parse(null, ""));
     Assert.DoesNotThrow(() => PrecompilationCommandLineParser.Parse(new string[0], ""));
 }
        public void ParseArgumentCases(string cmdline, string[] references, string appconfig)
        {
            var dir    = Guid.NewGuid().ToString();
            var args   = PrecompilationCommandLineParser.SplitCommandLine(cmdline);
            var parsed = PrecompilationCommandLineParser.Parse(args, dir);
            Func <string, string> resolvePath = Path.GetFullPath;

            Assert.AreEqual(dir, parsed.BaseDirectory);
            Assert.AreEqual(appconfig == null ? null : resolvePath(appconfig), parsed.AppConfig);
            CollectionAssert.AreEqual(references.Select(resolvePath), parsed.References);
        }
        public static void SplitArguments(string input, string[] expected)
        {
            var actual = PrecompilationCommandLineParser.SplitCommandLine(input);

            CollectionAssert.AreEqual(expected, actual);
        }