コード例 #1
0
        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);
        }
コード例 #2
0
 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));
 }
コード例 #3
0
 public void ThenThereIsAStepWithRegex(ScenarioBlock stepType, string stepDefRegex)
 {
     _bindingRegistry.Should().NotBeNull();
     _bindingRegistry.StepDefinitions.Should().Contain(sd => sd.StepDefinitionType == stepType && sd.Regex.ToString().Contains(stepDefRegex));
 }
コード例 #4
0
        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();
        }
コード例 #5
0
        public void ThenInvokingTheFirstItemFromTheJumpListNavigatesToTheStepDefinition(string stepRegex, ScenarioBlock stepType)
        {
            InvokeFirstContextMenuItem();

            ThenTheSourceFileOfTheStepDefinitionIsOpened(stepRegex, stepType);
        }