public void ThenTheSourceFileOfTheStepDefinitionIsOpened(string stepRegex, ScenarioBlock stepType) { _stepDefinitionBinding = _discoveryService.GetBindingRegistry().StepDefinitions.FirstOrDefault(b => b.StepDefinitionType == stepType && b.Regex.ToString().Contains(stepRegex)); _stepDefinitionBinding.Should().NotBeNull($"there has to be a {stepType} stepdef with regex '{stepRegex}'"); ActionsMock.LastNavigateToSourceLocation.Should().NotBeNull(); ActionsMock.LastNavigateToSourceLocation.SourceFile.Should().Be(_stepDefinitionBinding.Implementation.SourceLocation.SourceFile); }
public void ThenThereIsAStepWithSourceFileContaining(ScenarioBlock stepType, string expectedPathPart) { _bindingRegistry.Should().NotBeNull(); _bindingRegistry.StepDefinitions.Should().Contain(sd => sd.StepDefinitionType == stepType && sd.Implementation.SourceLocation != null && sd.Implementation.SourceLocation.SourceFile.Contains(expectedPathPart)); }
public void ThenThereIsAStepWithRegex(ScenarioBlock stepType, string stepDefRegex) { _bindingRegistry.Should().NotBeNull(); _bindingRegistry.StepDefinitions.Should().Contain(sd => sd.StepDefinitionType == stepType && sd.Regex.ToString().Contains(stepDefRegex)); }
public void ThenTheStepDefinitionSkeletonForTheStepShouldBeOfferedToCopyToClipboard(string stepText, ScenarioBlock stepType) { ActionsMock.LastShowQuestion.Should().NotBeNull(); ActionsMock.LastShowQuestion.Description.Should().Contain(stepText); ActionsMock.LastShowQuestion.Description.Should().Contain(stepType.ToString()); ActionsMock.LastShowQuestion.YesCommand.Should().NotBeNull(); }
public void ThenInvokingTheFirstItemFromTheJumpListNavigatesToTheStepDefinition(string stepRegex, ScenarioBlock stepType) { InvokeFirstContextMenuItem(); ThenTheSourceFileOfTheStepDefinitionIsOpened(stepRegex, stepType); }