// throws jjtraveler.VisitFailure public virtual void testAll() { Identity id = new Identity(); Logger expected = new Logger(id, new IVisitable[]{n3, n2} ); All all = new All( logVisitor(id) ); IVisitable nodeReturned = all.visit(n4); Assertion.AssertEquals(expected, logger); Assertion.AssertEquals(n4, nodeReturned); }
public virtual void testAll() { Identity id = new Identity(); All all = new All(logVisitor(id)); Logger expected = new Logger(id, new IVisitable[] { n1, n2 }); try { IVisitable nodeReturned = all.visit(n0); Assertion.AssertEquals(expected, logger); Assertion.AssertEquals(n0, nodeReturned); } catch (VisitFailure) { Assertion.Fail("VisitFailure should not occur!"); } }