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
12
Dependency Inversion - Example
gabrielbmoro
0
12
Other Decks in Programming
See All in Programming
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
23
12k
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
120
旅行プランAIエージェント開発の裏側
ippo012
2
890
AIコーディングAgentとの向き合い方
eycjur
0
270
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
20
11k
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
290
ソフトウェアテスト徹底指南書の紹介
goyoki
1
150
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
480
Swift Updates - Learn Languages 2025
koher
2
470
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
Kiroで始めるAI-DLC
kaonash
2
580
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.3k
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Music & Morning Musume
bryan
46
6.8k
Designing for humans not robots
tammielis
253
25k
GitHub's CSS Performance
jonrohan
1032
460k
Navigating Team Friction
lara
189
15k
The Language of Interfaces
destraynor
161
25k
Balancing Empowerment & Direction
lara
3
620
GraphQLとの向き合い方2022年版
quramy
49
14k
The Cult of Friendly URLs
andyhume
79
6.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