Exemple #1
0
        public void When_requesting_multiple_types_factory_does_not_return_null()
        {
            var kernel = new StandardKernel();

            kernel.BindMediatR();

            kernel.Bind <IRequestHandler <QueryFixture.Query, QueryFixture.Result> >().To <QueryFixtureHandler>();

            var factory = kernel.Get <ServiceFactory>();

            // Act
            var result = (IEnumerable <IRequestHandler <QueryFixture.Query, QueryFixture.Result> >)
                         factory(typeof(IEnumerable <IRequestHandler <QueryFixture.Query, QueryFixture.Result> >));

            // Assert
            result.Should().NotBeNull();
        }