// throws jjtraveler.VisitFailure public virtual void testNotOnSuccess() { Not not = new Not(new Identity()); IVisitable resultNode = null; try { resultNode = not.visit(n0); Assertion.Fail("VisitFailure should have occured"); } catch (VisitFailure) { Assertion.AssertNull(resultNode); } }
// throws jjtraveler.VisitFailure public virtual void testNotOnFailure() { Not not = new Not(new Fail()); IVisitable resultNode = not.visit(n0); Assertion.AssertEquals(n0,resultNode); }