You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am testing a class that generates destinations and return me an internal NullPointerExpection:
obtain(...) must not be null java.lang.NullPointerException: obtain(...) must not be null at com.ramcosta.composedestinations.navargs.parcelable.DefaultParcelableNavTypeSerializer.toBase64(DefaultParcelableNavTypeSerializer.kt:48) at com.ramcosta.composedestinations.navargs.parcelable.DefaultParcelableNavTypeSerializer.toRouteString(DefaultParcelableNavTypeSerializer.kt:24) at com.ramcosta.composedestinations.navargs.parcelable.DefaultParcelableNavTypeSerializer.toRouteString(DefaultParcelableNavTypeSerializer.kt:19) at com.ramcosta.composedestinations.generated.app.navtype.UriNavType.serializeValue(UriNavType.kt:41) at com.ramcosta.composedestinations.generated.app.destinations.HttpDeeplinkRedirectionScreenDestination.invoke(HttpDeeplinkRedirectionScreenDestination.kt:38) at com.ramcosta.composedestinations.generated.app.destinations.HttpDeeplinkRedirectionScreenDestination.invoke$default(HttpDeeplinkRedirectionScreenDestination.kt:32) at com.adidas.app.deeplink.Issue.test1(Issue.kt:11) at java.base/java.lang.reflect.Method.invoke(Unknown Source)
How to reproduce the error:
@Test
fun test1() {
val myDestination = MyScreenDestination(myUriParameter = "uri".toUri())
myDestination.route
}
As a workaround I have mocked the destination class as follows:
mockkObject(MyScreenDestination)
every {
MyScreenDestination.invoke(any(),any())
}returns Direction("")
The text was updated successfully, but these errors were encountered:
I am testing a class that generates destinations and return me an internal NullPointerExpection:
obtain(...) must not be null java.lang.NullPointerException: obtain(...) must not be null at com.ramcosta.composedestinations.navargs.parcelable.DefaultParcelableNavTypeSerializer.toBase64(DefaultParcelableNavTypeSerializer.kt:48) at com.ramcosta.composedestinations.navargs.parcelable.DefaultParcelableNavTypeSerializer.toRouteString(DefaultParcelableNavTypeSerializer.kt:24) at com.ramcosta.composedestinations.navargs.parcelable.DefaultParcelableNavTypeSerializer.toRouteString(DefaultParcelableNavTypeSerializer.kt:19) at com.ramcosta.composedestinations.generated.app.navtype.UriNavType.serializeValue(UriNavType.kt:41) at com.ramcosta.composedestinations.generated.app.destinations.HttpDeeplinkRedirectionScreenDestination.invoke(HttpDeeplinkRedirectionScreenDestination.kt:38) at com.ramcosta.composedestinations.generated.app.destinations.HttpDeeplinkRedirectionScreenDestination.invoke$default(HttpDeeplinkRedirectionScreenDestination.kt:32) at com.adidas.app.deeplink.Issue.test1(Issue.kt:11) at java.base/java.lang.reflect.Method.invoke(Unknown Source)
How to reproduce the error:
As a workaround I have mocked the destination class as follows:
The text was updated successfully, but these errors were encountered: