public void HandlerFilterGetsCalledLikeExpected() { Container.Register(Component.For <ISomeService>().ImplementedBy <FirstImplementation>(), Component.For <ISomeService>().ImplementedBy <SecondImplementation>(), Component.For <ISomeService>().ImplementedBy <ThirdImplementation>()); var filter = new TestHandlersFilter(); Container.Kernel.AddHandlersFilter(filter); Container.ResolveAll <ISomeService>(); Assert.IsTrue(filter.OpinionWasChecked, "Filter's opinion should have been checked once for each handler"); }
public void HandlerFilterGetsCalledLikeExpected() { Container.Register(Component.For<ISomeService>().ImplementedBy<FirstImplementation>(), Component.For<ISomeService>().ImplementedBy<SecondImplementation>(), Component.For<ISomeService>().ImplementedBy<ThirdImplementation>()); var filter = new TestHandlersFilter(); Container.Kernel.AddHandlersFilter(filter); Container.ResolveAll<ISomeService>(); Assert.IsTrue(filter.OpinionWasChecked, "Filter's opinion should have been checked once for each handler"); }