@@ -53,11 +53,9 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)
5353 var context = new EstateManagementContext ( DatabaseConnectionString ) ;
5454 Func < string , EstateManagementContext > f = connectionString => context ;
5555
56- //this.DbContextFactory = new Mock<IDbContextResolver<EstateManagementContext>>();
5756 containerBuilder . AddTransient < EstateManagementContext > ( _ => context ) ;
5857 var serviceProvider = containerBuilder . BuildServiceProvider ( ) ;
59- //var scope = serviceProvider.CreateScope();
60-
58+
6159 var inMemorySettings = new Dictionary < string , string >
6260 {
6361 { "ConnectionStrings:TransactionProcessorReadModel" , DatabaseConnectionString }
@@ -68,8 +66,6 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)
6866 . Build ( ) ;
6967
7068 IDbContextResolver < EstateManagementContext > resolver = new DbContextResolver < EstateManagementContext > ( serviceProvider , configuration ) ;
71- //IDbContextFactory<EstateManagementContext> factory = new DbContextFactory<EstateManagementContext>(new TestConnectionStringConfigurationRepository(DatabaseConnectionString), f);
72-
7369 IReportingManager manager = new ReportingManager ( resolver ) ;
7470
7571 containerBuilder . AddSingleton ( manager ) ;
@@ -86,33 +82,6 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)
8682
8783}
8884
89- public class TestConnectionStringConfigurationRepository : IConnectionStringConfigurationRepository
90- {
91- private readonly string DbConnectionString ;
92-
93- public TestConnectionStringConfigurationRepository ( String dbConnectionString )
94- {
95- DbConnectionString = dbConnectionString ;
96- }
97- public Task DeleteConnectionStringConfiguration ( string externalIdentifier , string connectionStringIdentifier ,
98- CancellationToken cancellationToken )
99- {
100- throw new NotImplementedException ( ) ;
101- }
102-
103- public async Task < string > GetConnectionString ( string externalIdentifier , string connectionStringIdentifier ,
104- CancellationToken cancellationToken )
105- {
106- return DbConnectionString ;
107- }
108-
109- public Task CreateConnectionString ( string externalIdentifier , string connectionStringIdentifier , string connectionString ,
110- CancellationToken cancellationToken )
111- {
112- throw new NotImplementedException ( ) ;
113- }
114- }
115-
11685public class TestAuthHandlerOptions : AuthenticationSchemeOptions
11786{
11887 public string DefaultUserId { get ; set ; } = null ! ;
0 commit comments