public void TestAccept()
        {
            MockVisitor visitor = new MockVisitor();

            Assert.IsFalse(visitor.isVisited);
            element.Accept(visitor);
            Assert.IsTrue(visitor.isVisited);
        }
Exemple #2
0
        public void TestAccept()
        {
            TextElement elem    = new TextElement(new WPF.Point(0, 0), "Foo", WPF.Media.Colors.Orange);
            MockVisitor visitor = new MockVisitor();

            Assert.IsFalse(visitor.isVisited);
            elem.Accept(visitor);
            Assert.IsTrue(visitor.isVisited);
        }
Exemple #3
0
 protected override void VerifyAcceptVisitorWasProper() => MockVisitor
 .Verify(visitor => visitor.VisitModulo(TestObject), Times.Once);
 protected override void VerifyAcceptVisitorWasProper() => MockVisitor
 .Verify(visitor => visitor.VisitLessThanOrEqual(TestObject), Times.Once);
 public void TestCleanup()
 {
     _tree    = null;
     _visitor = null;
 }
 public void TestInit()
 {
     _tree    = new GeneralTree <object>();
     _visitor = new MockVisitor();
 }