Seishin's Life
  • Home
  • About Me
Sign in Subscribe

unit testing

Troubles when trying to mock the Bundle class with Mockito

Yesterday I got this issue while trying to test some code that contained a Bundle object within. When I tried to mock the Bundle class... Nothing was happening and the test was constantly failing with: java.lang.RuntimeException: Method putString in android.os.BaseBundle not mocked. Hmm... The only solution
Atanas Dimitrov Aug 10, 2018
Mockito and testing Kotlin classes

Mockito and testing Kotlin classes

Hey there! 👻 Did you switch to Kotlin or yet wondering? Just do it! However, there're always some inconveniences like the one I will describe in this post. Problem You started happy coding your amazing apps in Kotlin but when unit testing time has come... Bam! You cannot test final classes
Atanas Dimitrov Mar 11, 2018

Subscribe to Seishin's Life

Don't miss out on the latest news. Sign up now to get access to the library of members-only articles.
  • Sign up
Seishin's Life © 2023. Powered by Ghost