コード例 #1
0
        public void SetUp()
        {
            _uow = MockRepository.GenerateMock<IUnitOfWork>();
            _insideBehavior = MockRepository.GenerateStub<IControllerActionBehavior>();
            _behavior = new access_the_database_through_a_unit_of_work(_uow) {InsideBehavior = _insideBehavior};
            _input = new TestInputModel();
            _output = new TestOutputModel();

            _actionFunc = i => new TestOutputModel();
        }
コード例 #2
0
        public void SetUp()
        {
            _controller = new TestController();
            _behavior = MockRepository.GenerateMock<IControllerActionBehavior>();
            _context = MockRepository.GenerateStub<IControllerConfigContext>();
            _curConfig = _context.CurrentConfig =
                new ControllerActionConfig(
                    typeof (ThunderdomeActionInvoker<TestController, TestInputModel, TestOutputModel>));
            _invoker =

                new ThunderdomeActionInvoker<TestController, TestInputModel, TestOutputModel>(_controller, _behavior, _context);
        }
コード例 #3
0
 public void SetUp()
 {
     _controller = new TestController();
     _behavior = MockRepository.GenerateStub<IControllerActionBehavior>();
     _context = MockRepository.GenerateStub<IControllerConfigContext>();
     _curConfig = _context.CurrentConfig =
         new ControllerActionConfig(typeof (RedirectActionInvoker<TestController, TestInputModel>));
     _curConfig.ActionDelegate = new Action<TestController, TestInputModel>((c, i) => c.RedirectAction(i));
     _expectedUrl = "EXPECTED_URL";
     var conventions = new FubuConventions {PrimaryApplicationUrl = _expectedUrl};
     _invoker = new RedirectActionInvoker<TestController, TestInputModel>(_controller, _behavior, conventions, _context);
     BeforeEach();
 }
コード例 #4
0
        public void SetUp()
        {
            _uow            = MockRepository.GenerateMock <IUnitOfWork>();
            _insideBehavior = MockRepository.GenerateStub <IControllerActionBehavior>();
            _behavior       = new access_the_database_through_a_unit_of_work(_uow)
            {
                InsideBehavior = _insideBehavior
            };
            _input  = new TestInputModel();
            _output = new TestOutputModel();

            _actionFunc = i => new TestOutputModel();
        }
コード例 #5
0
 public void SetUp()
 {
     _behavior = MockRepository.GenerateStub<IControllerActionBehavior>();
     _invoker = new PureBehaviorActionInvoker<TestInputModel, TestOutputModel>(_behavior);
 }