Skip to content

Commit

Permalink
Add oncreate test for QuestApplication (#2785)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharon2719 authored Sep 29, 2023
1 parent 6adca90 commit dfa5cd7
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.smartregister.fhircore.quest

import android.content.Intent
import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import io.mockk.every
Expand All @@ -30,6 +31,7 @@ import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.smartregister.fhircore.quest.robolectric.RobolectricTest
import org.smartregister.fhircore.quest.ui.appsetting.AppSettingActivity

@HiltAndroidTest
class QuestApplicationTest : RobolectricTest() {
Expand Down Expand Up @@ -91,4 +93,13 @@ class QuestApplicationTest : RobolectricTest() {

Assert.assertNotNull(config)
}

@Test
fun testOnCreate() {
hiltRule.inject()
application.onCreate()

val intent = Intent(application, AppSettingActivity::class.java)
application.startActivity(intent)
}
}

0 comments on commit dfa5cd7

Please sign in to comment.