Exemplo n.º 1
0
 public static void OutputCollection <T>(string header, IReadOnlyCollection <T> collection)
 {
     TestLog.WriteLine($"{header}:");
     foreach (T i in collection)
     {
         TestLog.WriteLine($"    {i}");
     }
     if (collection.Count == 0)
     {
         TestLog.WriteLine($"    <none>");
     }
 }
Exemplo n.º 2
0
 // Helpers
 protected override void OnAdd(TestStateBase <List <T> > .Phase phase)
 {
     if (this.Name != null)
     {
         string   phaseString = (phase == TestStateBase <List <T> > .Phase.Actual) ? "Actual" : "Expected";
         List <T> list        = (phase == TestStateBase <List <T> > .Phase.Actual) ? base.Actual : base.Expected;
         TestLog.WriteLine($"{phaseString} {this.Name}:{((list.Count == 0) ? " <none>" : "")}");
         foreach (var i in list)
         {
             TestLog.WriteLine($"    {i}");
         }
     }
 }