Commit ed02413
committed
Use test dispatcher & real DatabaseService in tests
Add mockk android test dependency and refactor RealmUserTest to use a real DatabaseService constructed with a test DispatcherProvider (all dispatchers set to Dispatchers.Unconfined). Removed the previous manual anonymous DatabaseService implementation and adjusted imports (added CoroutineDispatcher). This simplifies coroutine testing and ensures the database service uses a consistent test dispatcher and application context.1 parent 24dc15f commit ed02413
2 files changed
Lines changed: 8 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
Lines changed: 7 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
63 | 54 | | |
| 55 | + | |
64 | 56 | | |
65 | 57 | | |
66 | 58 | | |
| |||
0 commit comments