Exemplo n.º 1
0
        public void SetUp()
        {
            Nails.Configure()
            .IoC.Container <NailsFramework.IoC.Spring>()
            .InspectAssemblyOf <ErrorTestController>()
            .UserInterface.Platform(new NailsFramework.UserInterface.Mvc
            {
                ConfigureContext = false
            });

            Nails.Initialize();
            controller = TestControllers.Get <ErrorTestController>();
        }
Exemplo n.º 2
0
        public void ActionsShouldBeRanWithinUnitOfWorks()
        {
            Nails.Configure()
            .IoC.Container <NailsFramework.IoC.Spring>()
            .InspectAssemblyOf <TestController>()
            .UserInterface.Platform(new NailsFramework.UserInterface.Mvc
            {
                ConfigureContext = false
            });

            Nails.Initialize();

            var controller = TestControllers.Get <TestController>();

            controller.Index();
            Assert.IsTrue((bool)controller.ViewData["UnitOfWork"]);
        }