ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

Add reusable unit tests for `DefaultWorker` workers #636

Closed lawrence-forooghian closed 1 year ago

lawrence-forooghian commented 1 year ago

This adds a set of reusable unit tests that verify that a worker type provides the behaviours implemented by the DefaultWorker protocol.

I’ll first be using it in the unit tests for the upcoming UpdatePublisherPresence worker. Here is an example of how it looks in action (the name of the type has changed slightly since I wrote that, from DefaultWorkerTestEnvironment to DefaultWorkerTestScenarios).

See commit messages for more details.