Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 537 Bytes

README.md

File metadata and controls

7 lines (4 loc) · 537 Bytes

TestSchedulerDemo

This repository contains demonstration code for my Medium article iOS Unit Tests and Asynchronous Calls.

A simple class Delayer using DispatchQueue.main.asyncAfter is refactored to allow better unit testing.

The refactoring is done twice, first with ReactiveSwift, second with Combine. The ReactiveSwift part uses a global variable to access the TestScheduler, the Combine part uses Constructor Injection.