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
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
Nuxt Server Components
wattanx
0
230
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
1.2k
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
270
AI活用のコスパを最大化する方法
ochtum
0
360
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
270
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
740
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
290
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
180
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
230
安いハードウェアでVulkan
fadis
1
860
飯MCP
yusukebe
0
440
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
250
Code Reviewing Like a Champion
maltzj
528
40k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
150
sira's awesome portfolio website redesign presentation
elsirapls
0
200
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
ラッコキーワード サービス紹介資料
rakko
1
2.8M
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
98
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