Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MockK and Truth - Unit Tests - Android
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Moro
January 03, 2022
Programming
150
0
Share
MockK and Truth - Unit Tests - Android
First contact with the libraries: MockK and Truth.
Moro
January 03, 2022
More Decks by Moro
See All by Moro
More Accessible Apps - Android
gabrielbmoro
0
10
Variables and Tips - Android
gabrielbmoro
0
10
Migrating an Existing App to Compose - Android
gabrielbmoro
0
13
Recycler View and Performance - Android
gabrielbmoro
0
14
Repository Pattern and Productivity - Android
gabrielbmoro
0
14
What is new in Android Jetpack?
gabrielbmoro
0
19
List Users - Android
gabrielbmoro
0
5
Working with Collections - Kotlin
gabrielbmoro
0
16
Dependency Inversion - Example
gabrielbmoro
0
14
Other Decks in Programming
See All in Programming
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.6k
Building on Bluesky's AT Protocol with Ruby
mackuba
0
120
Making the RBS Parser Faster
soutaro
0
710
AI-DLC Deep Dive
yuukiyo
9
5.9k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
380
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
660
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
460
要はバランスからの卒業 #yumemi_grow
kajitack
0
160
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
22k
AI Agent と正しく分析するための環境作り
yoshyum
2
470
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
300
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Speed Design
sergeychernyshev
33
1.7k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
170
Designing for Performance
lara
611
70k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Docker and Python
trallard
47
3.8k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Transcript
Mockk & Truth Your Unit Tests better for reading By
Moro
MockK It is a powerful mocking library for Kotlin It
is a library to help us write more fluent assertions for Android. Truth
Example In this case, the MainViewModel has the responsibility for
defining the first destination, where the app starts. Has email stored? Dashboard Screen Welcome Screen Yes No
MainViewModel
MainViewModel Dependency
Mocking the Dependency
Mocking the Dependency
MainViewModel Test - Case #1 Has email stored? Dashboard Screen
Yes
MainViewModel Test - Case #2 Has email stored? Welcome Screen
No
None