Exemplo n.º 1
0
        public void OneTimeSetUp()
        {
            _testServer = new TestServer();
            _httpClient = _testServer.CreateClient();
            var secretsClient  = new AmazonSecretsManagerClient(RegionEndpoint.USWest2);
            var secretResponse = secretsClient.GetSecretValueAsync(new GetSecretValueRequest
            {
                SecretId = TestUserSecretId
            }).Result;

            _testUserCreds = JsonConvert.DeserializeObject <TestUserCreds>(secretResponse.SecretString);
            _emailAdapter  = new EmailAdapter();
            _user          = new AwsCognitoUser
            {
                FirstName   = "test",
                LastName    = "user",
                PhoneNumber = "+12223334444",
                UserName    = _testUserCreds.TraceTestUserEmail,
                Password    = _testUserCreds.TraceTestUserPassword
            };
            var serviceProvider = _testServer.GetTestServiceProvider();

            _authAdapter = serviceProvider.GetRequiredService <IAuthAdapter>();
            _httpHandler = new HttpHandler(_clientConfig, _httpClient);
            _apiClient   = new TraceApiClient(_httpHandler);
        }
Exemplo n.º 2
0
 public ClientService(IEmailAdapter emailAdapter, IClientReadOnlyRepository clientReadOnlyRepository, IClientWriteOnlyRepository clientWriteOnlyRepository, ApplicationConfiguration applicationConfiguration, ISubscriptionService subscriptionService)
 {
     this.emailAdapter              = emailAdapter ?? throw new ArgumentNullException(nameof(emailAdapter));
     this.clientReadOnlyRepository  = clientReadOnlyRepository ?? throw new ArgumentNullException(nameof(clientReadOnlyRepository));
     this.clientWriteOnlyRepository = clientWriteOnlyRepository ?? throw new ArgumentNullException(nameof(clientWriteOnlyRepository));
     this.applicationConfiguration  = applicationConfiguration ?? throw new ArgumentNullException(nameof(applicationConfiguration));
     this.subscriptionService       = subscriptionService ?? throw new ArgumentNullException(nameof(subscriptionService));
 }
Exemplo n.º 3
0
 public ClienteService(IEmailAdapter emailAdapter, IClienteReadOnlyRepository clienteReadOnlyRepository, IClienteWriteOnlyRepository clienteWriteOnlyRepository, ApplicationConfiguration applicationConfiguration, ILoggerFactory loggerFactory)
 {
     this.emailAdapter = emailAdapter ?? throw new ArgumentNullException(nameof(emailAdapter));
     this.clienteReadOnlyRepository  = clienteReadOnlyRepository ?? throw new ArgumentNullException(nameof(clienteReadOnlyRepository));
     this.clienteWriteOnlyRepository = clienteWriteOnlyRepository ?? throw new ArgumentNullException(nameof(clienteWriteOnlyRepository));
     this.applicationConfiguration   = applicationConfiguration ?? throw new ArgumentNullException(nameof(applicationConfiguration));
     this.logger = loggerFactory?.CreateLogger <ClienteService>() ?? throw new ArgumentNullException(nameof(loggerFactory));
 }
Exemplo n.º 4
0
 /// <summary>
 ///     Creates an AboutViewModel Object
 /// </summary>
 public AboutViewModel(IAppInformation appInformation,
                       IEmailAdapter emailAdapter,
                       IBrowserAdapter browserAdapter,
                       IStoreOperations storeOperations)
 {
     this.appInformation = appInformation;
     this.emailAdapter   = emailAdapter;
     this.browserAdapter = browserAdapter;
     storeFeatures       = storeOperations;
 }
Exemplo n.º 5
0
 /// <summary>
 ///     Creates an AboutViewModel Object
 /// </summary>
 public AboutViewModel(IAppInformation appInformation,
                       IEmailAdapter emailAdapter,
                       IBrowserAdapter browserAdapter,
                       IStoreOperations storeOperations,
                       IMvxLogProvider logProvider,
                       IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     this.appInformation = appInformation;
     this.emailAdapter   = emailAdapter;
     this.browserAdapter = browserAdapter;
     storeFeatures       = storeOperations;
 }
Exemplo n.º 6
0
        public CarsController(
            ICarsRepository carsRepository,
            ICarBusinessLogic businessLogic,
            IEmailAdapter emailAdapter,
            ICarVMBuilder carVmBuilder

            )
        {
            _carsRepository = carsRepository;
            _businessLogic  = businessLogic;
            _emailAdapter   = emailAdapter;
            _carVmBuilder   = carVmBuilder;
        }
Exemplo n.º 7
0
 public NewMeetingsNewsletter(IEnumerable<Meeting> meetings, IEmailAdapter emailAdapter)
 {
     _emailAdapter = emailAdapter;
     Meetings = meetings;
 }
Exemplo n.º 8
0
 public ClubServiceManager(IEmailAdapter emailAdapter, IClubRepository clubRepository) => (_emailAdapter, _clubRepository) = (emailAdapter, clubRepository);
Exemplo n.º 9
0
 public AlertsService(IEmailAdapter emailAdapter, ITwitterAdapter twitterAdapter)
 {
     _emailAdapter       = emailAdapter;
     _twitterAdapter     = twitterAdapter;
     _meetingsRepository = new MeetingsRepository();
 }
Exemplo n.º 10
0
 public NewMeetingsNewsletter(IEnumerable <Meeting> meetings, IEmailAdapter emailAdapter)
 {
     _emailAdapter = emailAdapter;
     Meetings      = meetings;
 }
Exemplo n.º 11
0
 public AlertsService(IEmailAdapter emailAdapter, ITwitterAdapter twitterAdapter)
 {
     _emailAdapter = emailAdapter;
     _twitterAdapter = twitterAdapter;
     _meetingsRepository = new MeetingsRepository();
 }
Exemplo n.º 12
0
 public SendEmailOnCourseSubscribeCompletedHandle(IEmailAdapter emailAdapter)
 {
     _emailAdapter = emailAdapter;
 }