In this lesson, we'll be updating the ViewModel to support saving a calculated tip by name. Through the process, you'll learn about computed properties with Kotlin and see first hand the value of good unit test coverage, to support code refactoring. We'll also learn about using Mockito to verify interactions with mock objects and how using a function within a function, can greatly simplify your test and convey intent.
Key concepts in this lesson that you will learn:
- How to use Kotlin computed properties for the View
- Refactoring with confidence, thanks to good test coverage
- How to verify interactions with mock objects using Mockito
- How to add a function within a function in Kotlin, to simplify them and convey intent.