Ejemplo n.º 1
0
 void Check(object obj, params object[] expected)
 {
     var data = Printing1.Flatten(obj);
     var counter = 0;
     foreach(var e in data.SelectMany(z=>z))
     {
         Assert.AreEqual(e.Key, expected[counter]);
         Assert.AreEqual(e.Value, expected[counter + 1]);
         counter += 2;
     }
     Assert.AreEqual(expected.Length, counter);
 }
Ejemplo n.º 2
0
 public static void Write <T>(string filename, IEnumerable <T> data)
 {
     File.WriteAllLines(filename, Printing1.ToCsvStrings(data));
 }