I've added a Test project and a bunch of unit tests to confirm the behaviour of CocoaSSDP. Theres a pretty solid coverage now, just the unhappy path (when socket server gives an error) which isn't really tested.
In order to add the test, I had to make two minor changes to the browser class. The first makes the socket server a property rather than ivar, the second uses lazy instantiation for this property. The rationale for this is so I can inject a mocked socket server to verify behaviour. Neither of these changes affect the API.
I've also added a .travis.yml file, which helps with future pull requests. Ping me back here if you want more info.
I've added a Test project and a bunch of unit tests to confirm the behaviour of
CocoaSSDP
. Theres a pretty solid coverage now, just the unhappy path (when socket server gives an error) which isn't really tested.In order to add the test, I had to make two minor changes to the browser class. The first makes the socket server a property rather than ivar, the second uses lazy instantiation for this property. The rationale for this is so I can inject a mocked socket server to verify behaviour. Neither of these changes affect the API.
I've also added a
.travis.yml
file, which helps with future pull requests. Ping me back here if you want more info.Cheers!