Skip to content

Commit f1f3a21

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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

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

33
import com.github.swent.echo.authentication.AuthenticationService
4+
import com.github.swent.echo.authentication.AuthenticationServiceImpl
5+
import com.github.swent.echo.data.repository.Repository
6+
import com.github.swent.echo.data.repository.RepositoryImpl
47
import dagger.hilt.android.testing.HiltAndroidRule
58
import dagger.hilt.android.testing.HiltAndroidTest
69
import io.github.jan.supabase.SupabaseClient
@@ -29,6 +32,8 @@ class DependencyInjectionTest {
2932

3033
@Inject lateinit var authenticationService: AuthenticationService
3134

35+
@Inject lateinit var repository: Repository
36+
3237
@Before
3338
fun setUp() {
3439
// This tells Hilt to inject the [supabaseClient] and [authenticationService] fields.
@@ -48,4 +53,9 @@ class DependencyInjectionTest {
4853
fun testAuthenticationServiceInjection() {
4954
assertEquals(SimpleAuthenticationService::class.java, authenticationService::class.java)
5055
}
56+
57+
@Test
58+
fun testRepositoryInjection() {
59+
assertEquals(RepositoryImpl::class.java, repository::class.java)
60+
}
5161
}

0 commit comments

Comments
 (0)