Пример #1
0
        public void ParseTest_Alias(string alias, params string[] lines)
        {
            Console.WriteLine("Input alias: {0}", alias);
            Console.WriteLine("Lines:");
            Console.WriteLine(string.Join(Environment.NewLine, lines));
            Console.WriteLine();

            var sc = ShortCommand.Create(alias, lines);

            foreach (var item in sc.Parameters)
            {
                Console.WriteLine(item.ToString());
            }

            Console.WriteLine();

            foreach (var item in sc.FormatLines)
            {
                Console.WriteLine(item);
            }
        }
Пример #2
0
 public void ParseTest_Throw(string alias, params string[] lines)
 {
     Assert.That(() => ShortCommand.Create(alias, lines), Throws.TypeOf <CommandParseException>());
 }