Slide 17
Slide 17 text
• Default behavior, WithContext return static Context
object
• In unit test, add extension ViewController.context
• Change context object to mock
• Easy to mock context because it depend to
ContextType
• Solve strong dependency to singleton pattern