Пример #1
0
        public void Simple()
        {
            var visitor  = new CountingVisitor <double>();
            var vector2D = new Vector2D();

            vector2D.AcceptVisitor(visitor);
            Assert.AreEqual(2, visitor.Count);
        }
Пример #2
0
        public void HasCompletedPost()
        {
            var visitor  = new ComparableFindingVisitor <double>(2);
            var vector2D = new Vector2D();

            vector2D.SetValues(2, 5);
            vector2D.AcceptVisitor(visitor);
            Assert.IsTrue(visitor.Found);
        }