public void test_that_session_repository_can_be_fulfilled_by_the_container()
        {
            var container = new WebContainer();
            var repository = container.TryGet<ISessionRepository>();

            Assert.IsNotNull(repository);
        }
        public void test_that_a_controller_can_be_extracted_by_interface_and_meta_name()
        {
            var container = new WebContainer();
            var controller = container.TryGet<IHttpController>("Session", new IParameter[0]);

            Assert.IsNotNull(controller);
        }
Beispiel #3
0
        protected void Application_Start()
        {
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            var kernel = new WebContainer();
            kernel.Settings.ActivationCacheDisabled = true;
            GlobalConfiguration.Configuration.DependencyResolver = new CodemashNinjectDependencyResolver(kernel);
        }
        public void Initialize()
        {
            // start the transaction
            _transactionScope = new TransactionScope();

            // add some test data
            CreateSessionTestData();

            // instantiate the container
            _container = new WebContainer();
        }
 public void test_that_the_web_container_can_be_instantiated()
 {
     var container = new WebContainer();
     Assert.IsNotNull(container);
 }
 public void Initialize()
 {
     _transactionScope = new TransactionScope();
     _container = new WebContainer();
     InsertTestSpeakerData();
 }
 public void Initialize()
 {
     var container = new WebContainer();
     _dependencyScope = new CodemashNinjectDependencyResolver(container);
 }