public ClubAccessService(IRepositoryWrapper repositoryWrapper, ClubAccessSettings settings, UserManager <DatabaseEntities.User> userManager, IMapper mapper)
 {
     _repositoryWrapper = repositoryWrapper;
     _clubAccessGetters = settings.ClubAccessGetters;
     _userManager       = userManager;
     _mapper            = mapper;
 }
Ejemplo n.º 2
0
        public void SetUp()
        {
            Mock <IUserStore <User> > _mockStore = new Mock <IUserStore <User> >();

            _mockUserManager = new Mock <UserManager <User> >(_mockStore.Object, null, null, null, null, null, null, null, null);

            _mockMapper = new Mock <IMapper>();

            _mockRepositoryWrapper = new Mock <IRepositoryWrapper>();

            _mockRepositoryWrapper.Setup(x => x.AdminType.GetFirstAsync(
                                             It.IsAny <Expression <Func <DatabaseEntities.AdminType, bool> > >(),
                                             It.IsAny <Func <IQueryable <DatabaseEntities.AdminType>, IIncludableQueryable <DatabaseEntities.AdminType, object> > >()))
            .ReturnsAsync(_adminType);

            _clubAccessSettings = new ClubAccessSettings(_mockRepositoryWrapper.Object);


            _clubAccessService = new ClubAccessService(_mockRepositoryWrapper.Object, _clubAccessSettings, _mockUserManager.Object, _mockMapper.Object);
        }
Ejemplo n.º 3
0
 public ClubAccessService(ClubAccessSettings settings, UserManager <DatabaseEntities.User> userManager, IMapper mapper)
 {
     _ClubAccessGetters = settings.ClubAccessGetters;
     _userManager       = userManager;
     _mapper            = mapper;
 }