Example #1
0
 private bool HasScopeTrait(
     string code,
     ScenarioScope scope)
 {
     var scopeTrait = string.Format("[TestProperty(TestTraits.Scope, \"{0}\")]", scope);
     return code.Contains(scopeTrait);
 }
Example #2
0
        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;
            }
        }