Ignore Launcher intent (was printing a warning).

This commit is contained in:
Benoit Marty 2023-12-06 17:10:39 +01:00
parent 6cc49cdfdb
commit de1a3dd3bb
2 changed files with 18 additions and 0 deletions

View file

@ -37,6 +37,17 @@ import org.robolectric.RuntimeEnvironment
@RunWith(RobolectricTestRunner::class)
class IntentResolverTest {
@Test
fun `resolve launcher intent should return null`() {
val sut = createIntentResolver()
val intent = Intent(RuntimeEnvironment.getApplication(), Activity::class.java).apply {
action = Intent.ACTION_MAIN
addCategory(Intent.CATEGORY_LAUNCHER)
}
val result = sut.resolve(intent)
assertThat(result).isNull()
}
@Test
fun `test resolve navigation intent root`() {
val sut = createIntentResolver()