Skip to content

Commit

Permalink
test: Home, Type 에도 koinTestRule 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Dec 1, 2024
1 parent 795e741 commit 6ea93b9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ import org.junit.Test
import org.junit.jupiter.api.DisplayName
import org.junit.runner.RunWith
import poke.rogue.helper.R
import poke.rogue.helper.presentation.di.testViewModelModule
import poke.rogue.helper.testing.rule.KoinAndroidUnitTestRule

@RunWith(AndroidJUnit4::class)
class HomeActivityTest {
@get:Rule
val activityRule = ActivityScenarioRule(HomeActivity::class.java)

@get:Rule
val koinTestRule =
KoinAndroidUnitTestRule(
testViewModelModule,
)

@Test
@DisplayName("앱이 실행되면 포켓로그 로고가 보인다")
fun test1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ import org.junit.Test
import org.junit.jupiter.api.DisplayName
import org.junit.runner.RunWith
import poke.rogue.helper.R
import poke.rogue.helper.presentation.di.testViewModelModule
import poke.rogue.helper.testing.rule.KoinAndroidUnitTestRule

@RunWith(AndroidJUnit4::class)
class TypeActivityTest {
@get:Rule
val activityRule = ActivityScenarioRule(TypeActivity::class.java)

@get:Rule
val koinTestRule =
KoinAndroidUnitTestRule(
testViewModelModule,
)

@Test
@DisplayName("사용자가 아무것도 선택하지 않은 경우에는 선택 안내 이미지가 보인다")
fun test1() {
Expand Down

0 comments on commit 6ea93b9

Please sign in to comment.