• Boilerplate infra for injector • Ugly factories and providers all around when going extreme • Touch 10 classes for a tiny naive change • Writing more code to support testing than the actual code you are testing
{ case modal(Screen) case push(Screen) } enum Screen { case job(String) case privateInfo var viewController: UIViewController { switch self { case .process(let id): ... case .privateInfo: ... } }
{ case viewDidLoad case userDidRefresh case jobsDownloaded([Job]) case errorDidArise(Error) case applyToJob(Job) } enum Effect { case downloadJobs case markJobAsApplied(Job.Id) } }
2. Control effects modelling them as values 3. Separate logic from effects 4. Unit tests for logic. Integration tests for the rest 5. Leverage state snapshots
2. Control effects modelling them as values 3. Separate logic from effects 4. Unit tests for logic. Integration tests for the rest 5. Leverage state snapshots 6. Use jsons to avoid boilerplate fixtures
2. Control effects modelling them as values 3. Separate logic from effects 4. Unit tests for logic. Integration tests for the rest 5. Leverage state snapshots 6. Use jsons to avoid boilerplate fixtures 7. Make your tests synchronous