Beispiel #1
0
        public void Init()
        {
            IoC.AddCatalogAssembly(Assembly.Load("vlko.Core.NH"));
            IoC.AddCatalogAssembly(Assembly.Load("vlko.BlogModule"));
            IoC.AddCatalogAssembly(Assembly.Load("vlko.BlogModule.NH"));

            IoC.AddRerouting<ICreateCommand<Hotel>>(() => new CrudCommands<Hotel>());
            IoC.AddRerouting<ICreateCommand<Room>>(() => new CrudCommands<Room>());
            IoC.AddRerouting<ICreateCommand<Reservation>>(() => new CrudCommands<Reservation>());
            IoC.AddRerouting<IAllQuery<Hotel>>(() => new AllLinqQuery<Hotel>());
            IoC.AddRerouting<IHotelRoomsQuery>(() => new HotelRoomsLinqQuery());
            IoC.AddRerouting<IReservationForDayQuery>(() => new ReservationForDayLinqQuery());
            IoC.AddRerouting<IProjectionQuery>(() => new ProjectionLinqQuery());

            base.SetUp();

            _Test = new BaseTest();
            _Test.Intialize();
        }
        public void Init()
        {
            //var doc = new XmlDocument();
            //doc.Load("log4net.config");
            //log4net.Config.XmlConfigurator.Configure(doc.DocumentElement);

            IoC.AddRerouting<ICreateCommand<Hotel>>(() => new CrudCommands<Hotel>());
            IoC.AddRerouting<ICreateCommand<Room>>(() => new CrudCommands<Room>());
            IoC.AddRerouting<ICreateCommand<Reservation>>(() => new CrudCommands<Reservation>());
            IoC.AddRerouting<IAllQuery<Hotel>>(() => new AllCriterionQuery<Hotel>());
            IoC.AddRerouting<IHotelRoomsQuery>(() => new HotelRoomsCriterionQuery());
            IoC.AddRerouting<IReservationForDayQuery>(() => new ReservationForDayCriterionQuery());
            IoC.AddRerouting<IProjectionQuery>(() => new ProjectionCriterionQuery());

            IoC.AddCatalogAssembly(Assembly.Load("vlko.Core.NH"));
            IoC.AddCatalogAssembly(Assembly.Load("vlko.BlogModule"));
            IoC.AddCatalogAssembly(Assembly.Load("vlko.BlogModule.NH"));
            base.SetUp();
            log4net.LogManager.GetLogger("test").Debug("test");

            _Test = new BaseTest();
            _Test.Intialize();
        }