Skip to content

Commit 7ba4ce8

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

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.github.swent.echo.di
22

33
import com.github.swent.echo.authentication.AuthenticationService
44
import com.github.swent.echo.authentication.AuthenticationServiceImpl
5+
import com.github.swent.echo.data.repository.Repository
56
import dagger.hilt.android.testing.HiltAndroidRule
67
import dagger.hilt.android.testing.HiltAndroidTest
78
import io.github.jan.supabase.SupabaseClient
@@ -30,6 +31,8 @@ class DependencyInjectionTest {
3031

3132
@Inject lateinit var authenticationService: AuthenticationService
3233

34+
@Inject lateinit var repository: Repository
35+
3336
@Before
3437
fun setUp() {
3538
// This tells Hilt to inject the [supabaseClient] and [authenticationService] fields.
@@ -49,4 +52,9 @@ class DependencyInjectionTest {
4952
fun testAuthenticationServiceInjection() {
5053
assertEquals(AuthenticationServiceImpl::class.java, authenticationService::class.java)
5154
}
55+
56+
@Test
57+
fun testRepositoryInjection() {
58+
assertEquals(Repository::class.java, repository::class.java)
59+
}
5260
}

0 commit comments

Comments
 (0)