示例#1
0
        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);
                }
            }
        }
示例#2
0
        public void TestNullAccept()
        {
            ObjectMatrix <int> m = GetTestMatrix();

            m.Accept(null);
        }