Skip to content

Commit e3ccb29

Browse files
committed
✅ TEST: repository injection
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
1 parent c11275b commit e3ccb29

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/androidTest/java/com/github/swent/echo/di/DependencyInjectionTest.kt

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.github.swent.echo.di
22

33
import com.github.swent.echo.authentication.AuthenticationService
4+
import com.github.swent.echo.data.repository.Repository
5+
import com.github.swent.echo.data.repository.RepositoryImpl
46
import dagger.hilt.android.testing.HiltAndroidRule
57
import dagger.hilt.android.testing.HiltAndroidTest
68
import io.github.jan.supabase.SupabaseClient
@@ -29,6 +31,8 @@ class DependencyInjectionTest {
2931

3032
@Inject lateinit var authenticationService: AuthenticationService
3133

34+
@Inject lateinit var repository: Repository
35+
3236
@Before
3337
fun setUp() {
3438
// This tells Hilt to inject the [supabaseClient] and [authenticationService] fields.
@@ -48,4 +52,9 @@ class DependencyInjectionTest {
4852
fun testAuthenticationServiceInjection() {
4953
assertEquals(SimpleAuthenticationService::class.java, authenticationService::class.java)
5054
}
55+
56+
@Test
57+
fun testRepositoryInjection() {
58+
assertEquals(RepositoryImpl::class.java, repository::class.java)
59+
}
5160
}

0 commit comments

Comments
 (0)