public BoundStepSuggestions(StepDefinitionType stepDefinitionType, INativeSuggestionItemFactory <TNativeSuggestionItem> nativeSuggestionItemFactory) { StepBinding = null; StepDefinitionType = stepDefinitionType; NativeSuggestionItem = nativeSuggestionItemFactory.Create("[unbound steps]", "...", 0, "nb", this); suggestions = new StepSuggestionList <TNativeSuggestionItem>(nativeSuggestionItemFactory); }
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; }
public BoundStepSuggestions(IStepDefinitionBinding stepBinding, INativeSuggestionItemFactory <TNativeSuggestionItem> nativeSuggestionItemFactory) { if (stepBinding == null) { throw new ArgumentNullException("stepBinding"); } StepBinding = stepBinding; StepDefinitionType = stepBinding.StepDefinitionType; string suggestionText = GetSuggestionText(stepBinding); NativeSuggestionItem = nativeSuggestionItemFactory.Create(suggestionText, GetInsertionText(StepBinding), 0, StepDefinitionType.ToString().Substring(0, 1) + "-b", this); suggestions = new StepSuggestionList <TNativeSuggestionItem>(nativeSuggestionItemFactory); }
public BoundInstanceTemplate(StepInstanceTemplate <TNativeSuggestionItem> template, INativeSuggestionItemFactory <TNativeSuggestionItem> nativeSuggestionItemFactory, IEnumerable <IBoundStepSuggestion <TNativeSuggestionItem> > suggestions) { Template = template; this.suggestions = new StepSuggestionList <TNativeSuggestionItem>(nativeSuggestionItemFactory, suggestions); NativeSuggestionItem = nativeSuggestionItemFactory.CloneTo(template.NativeSuggestionItem, this); }