Ejemplo n.º 1
0
 public UserService(IUserRepository repository, IMapper mapper, IOptions <AppSettingsSecret> appSettings,
                    IEmailClient emailClient)
 {
     this.repository   = repository;
     this.mapper       = mapper;
     this._appSettings = appSettings.Value;
     this._emailClient = emailClient;
 }
Ejemplo n.º 2
0
        public UserServiceTest()
        {
            var autoMapperProfile = new AutoMapperConfig();
            var config            = new MapperConfiguration(cfg => { cfg.AddProfile(autoMapperProfile); });

            _mapper = config.CreateMapper();

            _userRepoMock = new Mock <IUserRepository>();

            var options = new AppSettingsSecret()
            {
                Secret = "secretmustbelongerthat128bits"
            };

            _options = Options.Create(options);

            _emailMock = new Mock <IEmailClient>();

            _matchMock = new Mock <IMatchService>();
        }