Exemplo n.º 1
0
 IEnumerable <string> GetNames(CmdStream s)
 {
     foreach (Cmd c in s.Cmds.Where(x => x.Data.CmdName == "NameCmdLine"))
     {
         yield return(c.Data.GetValue <string>("Name"));
     }
 }
Exemplo n.º 2
0
        void CheckNames(CmdStream stream, string[] expect)
        {
            var actual = GetNames(stream).ToArray();

            Assert.AreEqual <int>(expect.Length, actual.Length);

            for (int i = 0; i < actual.Length; i++)
            {
                Assert.AreEqual <string>(expect[i], actual[i]);
            }
        }