public void TestAccept() { TrackingVisitor <int> visitor = new TrackingVisitor <int>(); ObjectMatrix <int> m = GetTestMatrix(); m.Accept(visitor); Assert.AreEqual(visitor.TrackingList.Count, m.Columns * m.Rows); for (int i = 0; i < m.Rows; i++) { for (int j = 0; j < m.Columns; j++) { Assert.AreEqual(visitor.TrackingList.Contains(i + j), true); } } }
public void TestNullAccept() { ObjectMatrix <int> m = GetTestMatrix(); m.Accept(null); }