Bouke / HAP

Swift implementation of the Homekit Accessory Protocol
https://boukehaarsma.nl/HAP/
MIT License
366 stars 50 forks source link

Update Server.Connection to permit use in unit testing #66

Closed gbrooker closed 5 years ago

gbrooker commented 5 years ago

Modifications to Server.Connection and MockConnection to allow a test instance to be created without network connections.

Bouke commented 5 years ago

What if we make the server argument optional in the constructor of Server.Connection?

gbrooker commented 5 years ago

For normal usage it should always have a Server argument. It is only when performing the unit tests that we need this fudge.

Bouke commented 5 years ago

Great, lets do this!