private CultureInfo GetBindingCulture(StepInstance stepInstance) { return(GetBindingCulture(stepInstance.StepContext.Language)); }
private IEnumerable <BoundStepSuggestions <TNativeSuggestionItem> > GetMatchingBoundStepSuggestions(StepInstance stepInstance) { return(boundStepSuggestions.GetMatchingItems(stepInstance.Text).Where(it => BindingMatchService.Match(it.StepBinding, stepInstance, GetBindingCulture(stepInstance), useRegexMatching: false, useParamMatching: false).Success)); }
public void AddStepInstance(StepInstance <TNativeSuggestionItem> stepInstance) { var matchingItems = GetMatchingBoundStepSuggestions(stepInstance); AddStepSuggestionToMatchingItems(stepInstance.StepDefinitionType, matchingItems, item => item.AddSuggestion(stepInstance)); }
public StepInstanceWithProjectScope(StepInstance stepInstance, VsProjectScope projectScope) { StepInstance = stepInstance; ProjectScope = projectScope; }
public StepInstanceTemplate(ScenarioStep scenarioStep, ScenarioOutline scenarioOutline, Feature feature, StepContext stepContext, INativeSuggestionItemFactory <TNativeSuggestionItem> nativeSuggestionItemFactory) { StepDefinitionType = (StepDefinitionType)scenarioStep.ScenarioBlock; Language = stepContext.Language; NativeSuggestionItem = nativeSuggestionItemFactory.Create(scenarioStep.Text, StepInstance <TNativeSuggestionItem> .GetInsertionText(scenarioStep), 1, StepDefinitionType.ToString().Substring(0, 1) + "-t", this); instances = new StepSuggestionList <TNativeSuggestionItem>(nativeSuggestionItemFactory); AddInstances(scenarioStep, scenarioOutline, feature, stepContext, nativeSuggestionItemFactory); var match = paramRe.Match(scenarioStep.Text); StepPrefix = match.Success ? scenarioStep.Text.Substring(0, match.Index) : scenarioStep.Text; }
private StepInstanceTemplate <TNativeSuggestionItem> GetParentTemplate(IBoundStepSuggestion <TNativeSuggestionItem> stepSuggestion) { StepInstance <TNativeSuggestionItem> stepInstance = stepSuggestion as StepInstance <TNativeSuggestionItem>; return(stepInstance != null ? stepInstance.ParentTemplate : null); }