private bool HasScopeTrait( string code, ScenarioScope scope) { var scopeTrait = string.Format("[TestProperty(TestTraits.Scope, \"{0}\")]", scope); return code.Contains(scopeTrait); }
private void UnderstandScope() { var isTopBottom = this.CurrentLine.IndexOf(TOKEN_DECLARATION_SCOPE_TOPDOWN, StringComparison.OrdinalIgnoreCase) != -1; if (isTopBottom) { this.currentScope = ScenarioScope.TopDown; return; } var isBottomUp = this.CurrentLine.IndexOf(TOKEN_DECLARATION_SCOPE_BOTTOMUP, StringComparison.OrdinalIgnoreCase) != -1; if (isBottomUp) { this.currentScope = ScenarioScope.BottomUp; return; } }