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
130
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
7
Variables and Tips - Android
gabrielbmoro
0
9
Migrating an Existing App to Compose - Android
gabrielbmoro
0
8
Recycler View and Performance - Android
gabrielbmoro
0
10
Repository Pattern and Productivity - Android
gabrielbmoro
0
10
What is new in Android Jetpack?
gabrielbmoro
0
14
List Users - Android
gabrielbmoro
0
4
Working with Collections - Kotlin
gabrielbmoro
0
10
Dependency Inversion - Example
gabrielbmoro
0
8
Other Decks in Programming
See All in Programming
エラーレスポンス設計から考える、0→1開発におけるGraphQLへの向き合い方
bicstone
5
1.5k
Rustではじめる負荷試験
skanehira
5
1.2k
事業フェーズの変化に対応する 開発生産性向上のゼロイチ
masaygggg
0
180
仮想ファイルシステムを導入して開発環境のストレージ課題を解消する
segadevtech
2
500
ブラウザ互換の重要性 - あらゆるユーザーに価値を届けるために必要なこと
yamanoku
0
110
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
160
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
580
Jakarta EE meets AI
ivargrimstad
1
330
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
160
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.3k
Increased Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
180
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
100
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
Faster Mobile Websites
deanohume
304
30k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
24
600
Clear Off the Table
cherdarchuk
91
320k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
Building an army of robots
kneath
302
42k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
Automating Front-end Workflow
addyosmani
1365
200k
Building a Scalable Design System with Sketch
lauravandoore
458
32k
In The Pink: A Labor of Love
frogandcode
139
22k
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