Esempio n. 1
0
            public WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyController()
            {
                MicroLiteReadOnlyController controller = new Mock <MicroLiteReadOnlyController>(_mockSession.Object).Object;

                var context = new ActionExecutingContext
                {
                    Controller = controller
                };

                var attribute = new AutoManageTransactionAttribute();

                attribute.OnActionExecuting(context);
            }
Esempio n. 2
0
            public WhenCallingOnActionExecuting_WithAMicroLiteController_AndAutoManageTransactionIsFalse()
            {
                MicroLiteController controller = new Mock <MicroLiteController>(_mockSession.Object).Object;

                var context = new ActionExecutingContext
                {
                    Controller = controller
                };

                var attribute = new AutoManageTransactionAttribute
                {
                    AutoManageTransaction = false
                };

                attribute.OnActionExecuting(context);
            }