We are starting off with an Xcode project with a unit test target and a single testing file. In case you are not familiar, a unit test class in iOS is a subclass of XCTestCase that provides several features, including the setUp() and tearDown() methods, that are run before every test, as shown in this code:
override func setUp() { super.setUp() } override func tearDown() { }
We will now define scheduler and subscription properties that will be used by the tests and then, in setup, we will initialize the scheduler with an initialClock value of 0. This is the beginning of time as far as the scheduler is concerned, and once the time reaches 1000 milliseconds, we will dispose of the subscription in ...