public AppService(HttpClient client, IOptions <OneSignalConfiguration> options, ApplicationDbContext dbContext, IMapper mapper) { _dbContext = dbContext; _mapper = mapper; _configuration = options.Value; _client = client; _client.BaseAddress = new Uri(_configuration.BaseUrl); _client.DefaultRequestHeaders.Add("Authorization", @$ "Basic {_configuration.UserAuthKey}"); _client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); }
public OneSignalTests(ITestOutputHelper output) { OneSignalConfiguration.SetupApiKey(Secrets.Values.OneSignalRestApiKey); OneSignalConfiguration.SetupAppId(Secrets.Values.OneSignalAppId); this.service = new NotificationService(); ShinyHost.Init(TestStartup.CurrentPlatform, new ActionStartup { BuildServices = x => { x.UseOneSignalPush <TestPushDelegate>(Secrets.Values.OneSignalAppId); }, BuildLogging = x => x.AddXUnit(output) }); this.push = (IPushPropertySupport)ShinyHost.Resolve <IPushManager>(); }