エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Unit Testing Lifecycle and State in ViewModels
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Unit Testing Lifecycle and State in ViewModels
Why It MattersYou can test a ViewModel by simply creating an instance using its constructor in yo... Why It MattersYou can test a ViewModel by simply creating an instance using its constructor in your test code. However, this approach has limitations — there is no straightforward way to: Trigger ViewModelStore.clear() / ViewModel.onCleared().Simulate a save and restore instance state change.With ViewModelScenario, these are now easy to test, helping you catch errors related to ViewModel clean-up

