RegisterHookBinding() public method

public RegisterHookBinding ( IHookBinding hookBinding ) : void
hookBinding IHookBinding
return void
Ejemplo n.º 1
0
        public void GetHooks_should_return_all_hooks()
        {
            var sut = new BindingRegistry();

            var hook1 = new HookBinding(new Mock<IBindingMethod>().Object, HookType.BeforeScenario, null, 1);
            var hook2 = new HookBinding(new Mock<IBindingMethod>().Object, HookType.AfterFeature, null, 2);
            sut.RegisterHookBinding(hook1);
            sut.RegisterHookBinding(hook2);

            var result = sut.GetHooks();

            result.Should().BeEquivalentTo(hook1, hook2);
        }