public void ShouldNotDetectOrderedValueAsParameter() { var args = new string[] { "--this-is-an-argument" }; var parser = new Parser(); parser.AddOrderedValue("blah"); var dict = parser.Parse(args); }
public void ShouldParseValidQuery() { var args = new string[] { "--arg1", "blah", "this is a random value", "-b", "bleh", "bleh", "--arg3" }; var parser = new Parser(); parser.AddOrderedValue("randovalue"); parser.AddOrderedValue("anotherrandovalue"); parser.AddParameter("arg1", "a", true); parser.AddParameter("arg2", "b", true); parser.AddParameter("arg3", "c", false); var dict = parser.Parse(args); foreach (var kvp in dict) { Console.WriteLine(kvp.Key + ": " + kvp.Value); } }