NordicSemiconductor / IOS-CoreBluetooth-Mock

Mocking library for CoreBluetooth framework.
BSD 3-Clause "New" or "Revised" License
225 stars 51 forks source link

Allow initializing a CBMServiceMock with arrays of services and characteristics #65

Closed jaylyerly closed 2 years ago

jaylyerly commented 2 years ago

This is a small patch to add another init method to CBMServiceMock. The existing method takes variadic parameters. Unfortunately, as far as I can tell, Swift doesn't provide a way to pass an array to a method that takes variadic params. The new init method takes arrays instead so between the two, now you can use variadic params or pass an array.

The existing init now calls the new init, so it should be getting exercised in all the unit tests.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.