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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
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
13
Other Decks in Programming
See All in Programming
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
1.2k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
420
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
750
Feature Toggle は捨てやすく使おう
gennei
0
390
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
210
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
100
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
210
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
130
KagglerがMixSeekを触ってみた
morim
0
360
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
160
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
170
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
97
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
New Earth Scene 8
popppiees
2
2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
110
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
490
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Ethics towards AI in product and experience design
skipperchong
2
240
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.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