Ejemplo n.º 1
0
        public WrmsSystemsController(IWrmsSystemManagementService wrmsSystemManagementService,
                                     IWrmsSystemSearchManagementService wrmsSystemSearchManagementService,
                                     IPersonManagementService personManagementService,
                                     IAuthenticationProvider authenticationProvider)
        {
            Check.Require(wrmsSystemManagementService != null, "wrmsSystemManagementService may not be null");

            _wrmsSystemManagementService       = wrmsSystemManagementService;
            _wrmsSystemSearchManagementService = wrmsSystemSearchManagementService;
            _personManagementService           = personManagementService;
            _authenticationProvider            = authenticationProvider;
        }
        public void SetUp()
        {
            ServiceLocatorInitializer.Init();

            _wrmsSystemManagementService =
                MockRepository.GenerateMock<IWrmsSystemManagementService>();
            _wrmsSystemSearchManagementService =
                MockRepository.GenerateMock<IWrmsSystemSearchManagementService>();
            _personManagementService = MockRepository.GenerateMock<IPersonManagementService>();
            _authenticationProvider = MockRepository.GenerateMock<IAuthenticationProvider>();

            _wrmsSystemsController =
                new WrmsSystemsController(_wrmsSystemManagementService, _wrmsSystemSearchManagementService,
                                          _personManagementService, _authenticationProvider);
        }