Beispiel #1
0
        private void InitApiClient(TestContext context)
        {
            NUnit.Framework.TestContext.Out.WriteLine("Initialising API Client");
            var bookingsHttpClient = new HttpClient();

            bookingsHttpClient.DefaultRequestHeaders.Authorization =
                new AuthenticationHeaderValue("bearer", context.Tokens.BookingsApiBearerToken);
            BookingApiClient = BookingsApiClient.GetClient(context.Config.Services.BookingsApiUrl, bookingsHttpClient);

            var videoHttpClient = new HttpClient();

            videoHttpClient.DefaultRequestHeaders.Authorization =
                new AuthenticationHeaderValue("bearer", context.Tokens.VideoApiBearerToken);
            VideoApiClient = VideoApiClient.GetClient(context.Config.Services.VideoApiUrl, videoHttpClient);
        }
Beispiel #2
0
 public void BeforeTestRun()
 {
     Context = new Setup().RegisterSecrets();
     InitApiClient(Context);
 }