@@ -59,7 +59,7 @@ class DatabaseIntegrationTests {
5959 try {
6060 // arrange database
6161 context = ApplicationProvider .getApplicationContext()
62- databaseManager = DatabaseManager .getInstance (context)
62+ databaseManager = DatabaseManager (context)
6363
6464 // arrange test users
6565 user1 = User (
@@ -84,15 +84,15 @@ class DatabaseIntegrationTests {
8484 val isAuth = authenticationService.authenticatedUser(user1.username, user1.password)
8585
8686 // arrange repositories
87- auditRepository = AuditRepositoryDb (context, authenticationService )
88- stockItemRepository = StockItemRepositoryDb (context )
89- warehouseRepository = WarehouseRepositoryDb (context )
90- userProfileRepository = UserProfileRepository (context )
87+ auditRepository = AuditRepositoryDb (authenticationService, databaseManager )
88+ stockItemRepository = StockItemRepositoryDb (databaseManager )
89+ warehouseRepository = WarehouseRepositoryDb (databaseManager )
90+ userProfileRepository = UserProfileRepository (databaseManager )
9191 projectRepository = ProjectRepositoryDb (
92- context = context,
9392 authenticationService = authenticationService,
9493 warehouseRepository = warehouseRepository,
95- stockItemRepository = stockItemRepository
94+ stockItemRepository = stockItemRepository,
95+ databaseManager = databaseManager
9696 )
9797
9898 // load sample data
0 commit comments