The interface of the RootViewModel
class shows that we only need to unit test the initializer and the refresh()
method. I explained earlier why I don't unit test the initializer and, in the previous episodes, we unit tested the refresh()
method. Does that mean that the test suite now completely covers the RootViewModel
class? The answer is no. This is a common mistake developers make. In this episode, we collect code coverage data to expose the gaps in the test suite.
Subscribe to Cocoacasts Plus to watch this episode.
Building a Weather Application From Scratch
Exposing Gaps in the Test Suite
by Bart Jacobs in Swift
Swift 4
Xcode 10
iOS 12
Building a Weather Application From Scratch
-
03:30
-
07:15
-
12:08
-
05:59
-
07:54
-
13:09
-
13:56
-
12 Organizing Fonts and Colors
06:45
-
13 Implementing the Day View Model
15:55
-
15 Implementing the Week View Model
12:37
-
20 Efficiently Refreshing Weather Data
08:48
-
09:40
-
22 Unit Testing With Mock Objects
10:49
-
23 Unit Testing Asynchronous Code
06:40
-
08:28
-
25 Exposing Gaps in the Test Suite
04:00