public override TestFramework VisitSubgraph([NotNull] DOTParser.SubgraphContext context) { TestUnitInfo info = this.Context.TestUnits.Peek(); TestSuite suite = CreateTestSuite(info, this.Context.ParentSuite); this.Context.ParentSuite = suite; if (this.Context.MasterTestSuite == null) { this.Context.MasterTestSuite = suite; } // Visit Children this.Framework = base.VisitSubgraph(context); // Register any child test cases while (info != this.Context.TestUnits.Peek()) { TestCase test = CreateTestCase(this.Context.TestUnits.Pop(), this.Context.ParentSuite); Visit(test); } // NOTE Suite is visited after children since it is at this point that we // can guarantee that the suite is fully formed Visit(suite); this.Context.TestUnits.Pop(); this.Context.ParentSuite = (TestSuite)suite.Parent; return(this.Framework); }
public override TestFramework VisitSubgraph([NotNull] DOTParser.SubgraphContext context) { TestUnitInfo info = this.Context.TestUnits.Peek(); TestSuite suite = CreateTestSuite(info, this.Context.ParentSuite); this.Context.ParentSuite = suite; if (this.Context.MasterTestSuite == null) { this.Context.MasterTestSuite = suite; } // Visit Children this.Framework = base.VisitSubgraph(context); // Register any child test cases while (info != this.Context.TestUnits.Peek()) { CreateTestCase(this.Context.TestUnits.Pop(), this.Context.ParentSuite); } this.Context.TestUnits.Pop(); this.Context.ParentSuite = (TestSuite)suite.Parent; return(this.Framework); }
public override void ExitSubgraph(DOTParser.SubgraphContext context) { OnRuleLeave(Rule.Subgraph, context.GetText()); base.ExitSubgraph(context); }
public override void EnterSubgraph(DOTParser.SubgraphContext context) { OnRuleEnter(Rule.Subgraph, context.GetText()); base.EnterSubgraph(context); }
/// <summary> /// Exit a parse tree produced by <see cref="DOTParser.subgraph"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitSubgraph([NotNull] DOTParser.SubgraphContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="DOTParser.subgraph"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitSubgraph([NotNull] DOTParser.SubgraphContext context) { return(VisitChildren(context)); }