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
Moro
January 03, 2022
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
12
Variables and Tips - Android
gabrielbmoro
0
14
Migrating an Existing App to Compose - Android
gabrielbmoro
0
16
Recycler View and Performance - Android
gabrielbmoro
0
15
Repository Pattern and Productivity - Android
gabrielbmoro
0
16
What is new in Android Jetpack?
gabrielbmoro
0
24
List Users - Android
gabrielbmoro
0
10
Working with Collections - Kotlin
gabrielbmoro
0
18
Dependency Inversion - Example
gabrielbmoro
0
16
Other Decks in Programming
See All in Programming
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
220
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
330
Performance Engineering for Everyone
elenatanasoiu
0
270
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
160
symfony/aiとlaravel/boost
77web
0
130
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
760
フィードバックで育てるAI開発
kotaminato
1
120
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.1k
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
230
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
First, design no harm
axbom
PRO
2
1.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
Writing Fast Ruby
sferik
630
63k
Building Applications with DynamoDB
mza
96
7.1k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Rails Girls Zürich Keynote
gr2m
96
14k
4 Signs Your Business is Dying
shpigford
187
22k
Mind Mapping
helmedeiros
PRO
1
280
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