mbed-os/UNITTESTS/fakes/ble/source
Vincent Coubard 0feaae6d18 Add fake implementation for GattServerMock::addService.
It is not easy to write expectations for this function:
- The data in input is a complex tree that is not comparable.
- The data in input is modified: The attributes of each element of
the tree is added by the server.

To ease test, a default implementation has been added but it is
still possible to override it or set expectations.
That default implementation set unique attribute handles for
each element of the service and _copy_ it in the GattServerMock.

The copy does *not* follow standard BLE API, it is a _POD_ where
each element of the object is accessible as a field. Childs are
stored in vector to ease iteration and memory management.

The representation of the services registered into the mock are
accessible in GattServerMock::services.
2021-02-10 11:26:25 +00:00
..
generic Add Bluetooth stubs as libs (#14229) 2021-02-09 14:52:30 +00:00
GattServerImpl.h Add Bluetooth stubs as libs (#14229) 2021-02-09 14:52:30 +00:00
GattServerImpl_mock.cpp Add fake implementation for GattServerMock::addService. 2021-02-10 11:26:25 +00:00