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
11
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
12
Dependency Inversion - Example
gabrielbmoro
0
12
Other Decks in Programming
See All in Programming
CEDEC2025 長期運営ゲームをあと10年続けるための0から始める自動テスト ~4000項目を50%自動化し、月1→毎日実行にした3年間~
akatsukigames_tech
0
110
[DevinMeetupTokyo2025] コード書かせないDevinの使い方
takumiyoshikawa
2
270
なぜあなたのオブザーバビリティ導入は頓挫するのか
ryota_hnk
5
580
Jakarta EE Meets AI
ivargrimstad
0
610
QA x AIエコシステム段階構築作戦
osu
0
250
構文解析器入門
ydah
7
2k
GUI操作LLMの最新動向: UI-TARSと関連論文紹介
kfujikawa
0
600
管你要 trace 什麼、bpftrace 用下去就對了 — COSCUP 2025
shunghsiyu
0
320
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
470
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
38
11k
MySQL9でベクトルカラム登場!PHP×AWSでのAI/類似検索はこう変わる
suguruooki
1
290
0から始めるモジュラーモノリス-クリーンなモノリスを目指して
sushi0120
0
250
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Practical Orchestrator
shlominoach
190
11k
Rails Girls Zürich Keynote
gr2m
95
14k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Building Applications with DynamoDB
mza
95
6.5k
A Tale of Four Properties
chriscoyier
160
23k
GitHub's CSS Performance
jonrohan
1031
460k
Producing Creativity
orderedlist
PRO
347
40k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
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