Exemple #1
0
        public void ArgumentParserReturnsEmptyListWhenNoArgumentsProvided()
        {
            string[] args = new string[0];

            ArgumentParser argumentParser = new ArgumentParser();
            Dictionary<string, string> arguments = argumentParser.Parse(args);

            Assert.AreEqual(0, arguments.Count);
        }
Exemple #2
0
        public void ArgumentParserReturnsData()
        {
            string[] args = new string[1];
            args[0] = "-A";

            ArgumentParser argumentParser = new ArgumentParser();
            Dictionary<string, string> arguments = argumentParser.Parse(args);

            Assert.AreEqual(arguments["A"],"A");
        }
Exemple #3
0
        public void ArgumentParserReturnsArgumentWithoutDashAndValue()
        {
            string[] args = new string[6];
            args[0] = "-c";
            args[1] = "Mixed";
            args[2] = "-l";
            args[3] = "8";
            args[4] = "-p";
            args[5] = "Numeric";

            ArgumentParser argumentParser = new ArgumentParser();
            Dictionary<string, string> arguments = argumentParser.Parse(args);

            Assert.AreEqual(arguments["c"],"Mixed");
        }