public void MvcApplication_StartAndEnd_BootstrapperUsed() { mockBootStrapper.Setup(m => m.Container).Returns(new Mock <IContainerProvider>().Object); var mockHttpContext = new Mock <HttpContextBase>(); var sut = new TestMvcApplication(); sut.Init(); sut.GetType().GetMethod("Application_Start", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(sut, null); Assert.IsNotNull(sut.Container); sut.GetType().GetMethod("Application_End", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(sut, null); mockBootStrapper.Verify(m => m.Start(), Times.Once()); mockBootStrapper.Verify(m => m.End(), Times.Once()); }
public void SimpleInjectorMvcApplication_CreateBootstrapper() { var bootstrapper = new TestMvcApplication().TestCreateBootstrapper(); Assert.IsNotNull(bootstrapper); }
public void UnityMvcApplication_CreateBootstrapper() { var bootstrapper = new TestMvcApplication().TestCreateBootstrapper(); Assert.IsNotNull(bootstrapper); }