public OnboardingServiceTests() { _csvReportGenerator = new CsvReportGenerator(); _agenciesService = new AgenciesService( CreateMapper(), DbContextProvider.GetSqlServerDbContext()); _venuesService = new VenuesService( CreateMapper(), DbContextProvider.GetSqlServerDbContext()); _userManagerMock = IdentityMocksProvider.GetMockUserManager(); var fixture = new Fixture(); var signingKey = new SymmetricSecurityKey(Encoding.Default.GetBytes(fixture.Create <string>())); _jwtConfiguration = fixture .Build <JwtConfiguration>() .With(config => config.SigningCredentials, new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256)) .Create(); var jwtFactory = new JwtFactory(CreateJwtFactoryConfiguration()); _usersService = new UsersService( _userManagerMock.Object, jwtFactory, CreateMapper()); _peopleService = new PeopleService( CreateMapper(), DbContextProvider.GetSqlServerDbContext(), _usersService); _weddingsService = new WeddingsService( CreateMapper(), DbContextProvider.GetSqlServerDbContext()); _onboardingService = new OnboardingService( CreateMapper(), DbContextProvider.GetSqlServerDbContext(), _agenciesService, _csvReportGenerator, _venuesService, _peopleService, _weddingsService); }
public OnboardingService( IMapper mapper, ApplicationDbContext dbContext, IAgenciesService agenciesService, ICsvReportGenerator csvReportGenerator, IVenuesService venuesService, IPeopleService peopleService, IWeddingsService weddingsService) : base(mapper, dbContext) { _agenciesService = agenciesService; _csvReportGenerator = csvReportGenerator; _venuesService = venuesService; _peopleService = peopleService; _weddingsService = weddingsService; }