public SpecFlowTestHooks(
            EntityFrameworkContext entityFrameworkContext, 
            TestContext testContext,
            FixtureContext fixtureContext,
            TestGetCurrentUserQuery testGetCurrentUserQuery)
        {
            this.entityFrameworkContext = entityFrameworkContext;
            this.testContext = testContext;

            fixtureContext.Fixture.Customize(new AutoConfiguredNSubstituteCustomization());
            fixtureContext.Fixture.Customize(new ApiControllerCustomisation());
            HttpContext.Current = HttpContextFaker.FakeHttpContext();

            fixtureContext.Fixture.Register<IDataContext>(() => entityFrameworkContext.DataContext);
            fixtureContext.Fixture.Register<IGetCurrentUserQuery>(() => testGetCurrentUserQuery);

            fixtureContext.Fixture.RegisterForAssembly(typeof(IAddEntityCommand).Assembly, "FinalYearProjectBlog.CommandQuery.Commands");
            fixtureContext.Fixture.RegisterForAssembly(typeof(IGetAllEntityQuery).Assembly, "FinalYearProjectBlog.CommandQuery.Queries");
            fixtureContext.Fixture.RegisterForAssembly(typeof(IBlogPostMapper).Assembly, "FinalYearProjectBlog.Model.Mappers");
            fixtureContext.Fixture.RegisterForAssembly(typeof(IBlogPostControllerValidator).Assembly, "FinalYearProjectBlog.Web.Controllers.Api.Validators");
            fixtureContext.Fixture.RegisterForAssembly(typeof(IEmailSenderService).Assembly, "FinalYearProjectBlog.CommandQuery.Services");
            fixtureContext.Fixture.RegisterForAssembly(typeof(IBlogPostViewModelBuilder).Assembly, "FinalYearProjectBlog.Web.View.Builders");

            fixtureContext.Fixture.Register<ISimpleInjectorConfig>(() => new TestSimpleInjectorConfig(fixtureContext.SpecimenContext));
        }
 public INativeTest ForTest(FixtureContext fixtureContext, TestContext testContext)
 {
     Results[testContext.Position] = testContext.Name.Shortname;
     return(new NoopTest(testContext.Name));
 }
 public TestBlogPostController(FixtureContext fixtureContext)
 {
     blogPostController = fixtureContext.Fixture.Create<BlogPostController>();
 }
 public TestImpersonationController(FixtureContext fixtureContext)
 {
     impersonationController = fixtureContext.Fixture.Create<ImpersonationController>();
 }
 public TestCommentController(FixtureContext fixtureContext)
 {
     commentController = fixtureContext.Fixture.Create<CommentController>();
 }
 public INativeTest ForTest(FixtureContext fixtureContext, TestContext testContext)
 {
     return(new ValidatingNativeTestWrapper(_factory.ForTest(fixtureContext, testContext)));
 }
 public TestUserController(FixtureContext fixtureContext)
 {
     userController = fixtureContext.Fixture.Create<UserController>();
 }