~/talk

How to write a mock-free app

Talkat droidcon Berlin 2025 · 2025-09-24..09-26· [testing, kotlin]
speakerdeck:budius
slides:none on file

Argues that avoiding Mockito/MockK yields simpler, more reliable tests by replacing interface+fake boilerplate with Kotlin features: use fun interfaces, typealiases and inline lambdas so ViewModels and Repositories receive callables instead of mocked classes. Shows examples with Retrofit for I/O and Coin for DI, explains test stubs become two-character lambdas, and claims these patterns run in production across an 80+ gradle-module codebase with apps downloaded over 3 million times, reducing boilerplate and flakiness.

AI-written summary · about

  1. 0:00Introduction
  2. 2:08Mocks in testing problems
  3. 3:53Clean architecture patterns
  4. 7:06Elephant horse cat testing
  5. 9:16Testing with elephant
  6. 11:01Testing with horse
  7. 13:57Testing with cat
  8. 16:25Conclusion SOLID principles
  9. 17:29Android context in ViewModels
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.