コード例 #1
0
        public void OneTimeSetup()
        {
            ConfigurationHelper.ConfigurationRoot = new ConfigurationBuilder()
                                                    .AddJsonFile("appsettings.json")
                                                    .Build();
            DataSeeder = new DataSeeder();
            var configurations = ConfigurationHelper.GetValues(JwtEndpointKey, AuthenticationKey, ApiVersionKey);

            AuthenticationEndpoint = $"{configurations[0]}{configurations[1]}";
            ApiVersion             = configurations[2];
            Client = CreateTestClient();

            Client.DefaultRequestHeaders
            .Accept
            .Add(new MediaTypeWithQualityHeaderValue(ApplicationJson));
        }
コード例 #2
0
        public async Task TearDown()
        {
            await DataSeeder.ResetDatabaseAsync();

            Client.DefaultRequestHeaders.Remove(Authorization);
        }
コード例 #3
0
 public async Task Setup()
 {
     await DataSeeder.SeedDatabaseAsync();
 }