$30 off During Our Annual Pro Sale. View Details »
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
dotfiles 式年遷宮 令和最新版
masawada
1
780
認証・認可の基本を学ぼう前編
kouyuume
0
250
認証・認可の基本を学ぼう後編
kouyuume
0
240
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.3k
Your Architecture as a Crime Scene?Forensic Analysis
manfredsteyer
PRO
0
100
SwiftUIで本格音ゲー実装してみた
hypebeans
0
390
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
720
開発に寄りそう自動テストの実現
goyoki
2
1k
マスタデータ問題、マイクロサービスでどう解くか
kts
0
100
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
420
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
140
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
130
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
How STYLIGHT went responsive
nonsquared
100
6k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.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