Пример #1
0
        public UserService(
            ISecurityService securityService,
            IUserRoleService userRoleService,
            IUserOrganizationService userOrganizationService,
            IRoleActionMasterService roleActionMasterService,
            IUserRepository userRepository,
            IUserPasswordRepository userPasswordRepository,
            IRoleActionOrganizationRepository roleActionOrganizationRepository)
        {
            _securityService = securityService;
            _userRoleService = userRoleService;
            _userOrganizationService = userOrganizationService;
            _roleActionMasterService = roleActionMasterService;

            _userRepository = userRepository;
            _userPasswordRepository = userPasswordRepository;
            _roleActionOrganizationRepository = roleActionOrganizationRepository;
        }
Пример #2
0
        public void TestInitialize()
        {
            _userRepository  = Substitute.For <IUserRepository>();
            _securityService = Substitute.For <ISecurityService>();
            _roleActionOrganizationRepository = Substitute.For <IRoleActionOrganizationRepository>();
            _userPasswordRepository           = Substitute.For <IUserPasswordRepository>();
            _roleActionMasterService          = Substitute.For <IRoleActionMasterService>();
            _userOrganizationService          = Substitute.For <IUserOrganizationService>();
            _userRoleService = Substitute.For <IUserRoleService>();

            _userService = new UserService(
                _securityService,
                _userRoleService,
                _userOrganizationService,
                _roleActionMasterService,
                _userRepository,
                _userPasswordRepository,
                _roleActionOrganizationRepository);
        }