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>();
        }
Beispiel #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"]);
        }