private Mock<IHookBinding> CreateParametrizedHookMock(List<IHookBinding> hookList, params Type[] paramTypes) { var hookMock = CreateHookMock(hookList); var bindingMethod = new BindingMethod(new BindingType("AssemblyBT", "BT", "Test.BT"), "X", paramTypes.Select((paramType, i) => new BindingParameter(new RuntimeBindingType(paramType), "p" + i)), RuntimeBindingType.Void); hookMock.Setup(h => h.Method).Returns(bindingMethod); return hookMock; }
private StepDefinitionBinding CreateStepDefinitionBinding(string regex) { var bindingType = new BindingType("StepNameReplacerTests", "UnitTests.StepNameReplacerTests"); var bindingScope = new BindingScope(null, null, null); var bindingMethod = new BindingMethod(bindingType, "", Enumerable.Empty <IBindingParameter>(), bindingType); var binding = new StepDefinitionBinding(StepDefinitionType.Given, regex, bindingMethod, bindingScope); return(binding); }