public void TestEncodeFromPatternFile()
        {
            var tp = TestPattern.Load(@"..\..\pattern.xml");

            Assert.IsTrue(tp.PatternList.Length > 0);

            foreach (var p in tp.PatternList)
            {
                var encoded = CommandLine.ToString(p.Input);

                var m = string.Format("■Input[{0}] Output[{1}] Encoded[{2}]",
                                      p.Input, p.Output, encoded);
                Trace.WriteLine(m);

                Assert.AreEqual(encoded, p.Output);
            }
        }
        public void TestParseFromPatternFile()
        {
            var tp = TestPattern.Load(@"..\..\pattern.xml");

            Assert.IsTrue(tp.PatternList.Length > 0);

            foreach (var p in tp.PatternList)
            {
                var cl = CommandLine.Parse(p.Output);
                Assert.IsNotNull(cl);

                Assert.IsFalse(cl.IsEmpty);
                var decoded = cl.All[0];

                var m = string.Format("■Input[{0}] Output[{1}] Decoded[{2}]",
                                      p.Output, p.Input, decoded);
                Trace.WriteLine(m);

                Assert.AreEqual(decoded, p.Input);
            }
        }