protected virtual void ExecuteActions(ActionPhase phase) { List<TestAction> targetActions = new List<TestAction>(); if (this.suiteActions != null) { foreach (var action in this.suiteActions) { if(action.DoesTarget(TestAction.TargetsTest)) targetActions.Add(action); } } if (this.actions != null) { foreach (var action in this.actions) { #if DEFAULT_APPLIES_TO_TESTCASE if (!(Parent is ParameterizedMethodSuite) && (action.DoesTarget(TestAction.TargetsDefault) || action.DoesTarget(TestAction.TargetsTest))) #else if (action.DoesTarget(TestAction.TargetsDefault) || (!(Parent is ParameterizedMethodSuite) && action.DoesTarget(TestAction.TargetsTest))) #endif targetActions.Add(action); } } ActionsHelper.ExecuteActions(phase, targetActions, this); }
protected virtual void ExecuteActions(ActionPhase phase) { List <TestAction> targetActions = new List <TestAction>(); if (this.actions != null) { foreach (var action in this.actions) { if (action.DoesTarget(TestAction.TargetsSuite) || action.DoesTarget(TestAction.TargetsDefault)) { targetActions.Add(action); } } } ActionsHelper.ExecuteActions(phase, targetActions, this); }