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
0
150
MockK and Truth - Unit Tests - Android
First contact with the libraries: MockK and Truth.
Moro
January 03, 2022
Tweet
Share
More Decks by Moro
See All by Moro
More Accessible Apps - Android
gabrielbmoro
0
9
Variables and Tips - Android
gabrielbmoro
0
10
Migrating an Existing App to Compose - Android
gabrielbmoro
0
12
Recycler View and Performance - Android
gabrielbmoro
0
12
Repository Pattern and Productivity - Android
gabrielbmoro
0
13
What is new in Android Jetpack?
gabrielbmoro
0
18
List Users - Android
gabrielbmoro
0
5
Working with Collections - Kotlin
gabrielbmoro
0
15
Dependency Inversion - Example
gabrielbmoro
0
12
Other Decks in Programming
See All in Programming
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
730
AgentCoreとHuman in the Loop
har1101
5
240
CSC307 Lecture 09
javiergs
PRO
1
840
Patterns of Patterns
denyspoltorak
0
1.4k
CSC307 Lecture 04
javiergs
PRO
0
660
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
ぼくの開発環境2026
yuzneri
0
230
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
AI時代の認知負荷との向き合い方
optfit
0
160
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
高速開発のためのコード整理術
sutetotanuki
1
400
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.6k
The browser strikes back
jonoalderson
0
380
KATA
mclloyd
PRO
34
15k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
86
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
940
It's Worth the Effort
3n
188
29k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Designing for Timeless Needs
cassininazir
0
130
Being A Developer After 40
akosma
91
590k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
Product Roadmaps are Hard
iamctodd
PRO
55
12k
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