public GetScoreSummariesAsyncTests(DynamoDbDockerFixture fixture, ITestOutputHelper helper) { _fixture = fixture; _helper = helper; _tableName = this.GetType().FullName.Replace(".", "_"); _configuration = new ConfigurationBuilder().AddInMemoryCollection().Build(); _amazonDynamoDb = new DynamoDbClientFactory().SetEndpointUrl(_fixture.Endpoint).Create(); _commonLogic = new ScoreCommonLogicMock(); _services = new ServiceCollection(); _services.AddScoped <ScoreSummaryGetter>(); _services.AddScoped <ScoreCreator>(); _services.AddScoped <Initializer>(); _services.AddScoped(_ => _amazonDynamoDb); _services.AddScoped <IConfiguration>(_ => _configuration); _services.AddScoped <IScoreQuota, ScoreQuota>(); _services.AddScoped(_ => _commonLogic.Object); // 共通前処理 _configuration[EnvironmentNames.ScoreDynamoDbTableName] = _tableName; }