public void ProcessTypeAndMethod_InVisualStudioExtension_ShouldFindBinding() { // The Visual Studio Extension uses a source code based binding reflection that // * cannot support IPolymorphicBindingType // * resolves the BindingSourceAttribute from the step definition source code without the Types property //ARRANGE var sut = CreateBindingSourceProcessor(); BindingSourceType bindingSourceType = new BindingSourceType { Attributes = new[] { CreateBindingSourceAttribute("BindingAttribute", "TechTalk.SpecFlow.BindingAttribute") }, }; BindingSourceMethod bindingSourceMethod = new BindingSourceMethod(); bindingSourceMethod.Attributes = new[] { CreateBindingSourceAttribute("GivenAttribute", "TechTalk.SpecFlow.GivenAttribute") .WithValue("an authenticated user"), }; //ACT sut.ProcessType(bindingSourceType); sut.ProcessMethod(bindingSourceMethod); //ASSERT var binding = sut.StepDefinitionBindings.Should().ContainSingle().Subject; binding.StepDefinitionType.Should().Be(StepDefinitionType.Given); binding.Regex.Should().NotBeNull(); binding.Regex.IsMatch("an authenticated user").Should().BeTrue(); }
protected override void ProcessStepArgumentTransformations(BindingSourceMethod bindingSourceMethod, BindingScope[] methodScopes) { //nop - not needed for IDE integration }
protected override void ProcessHooks(BindingSourceMethod bindingSourceMethod, BindingScope[] methodScopes) { //nop - not needed for IDE integration }