Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: convert mock notation to new style in GattServerMock.hpp #459

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions services/ble/test_doubles/GattServerMock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,31 @@ namespace services
: public GattServer
{
public:
MOCK_METHOD1(AddService, void(GattServerService& service));
MOCK_METHOD(void, AddService, (GattServerService& service));
EkelmansPh marked this conversation as resolved.
Show resolved Hide resolved
};

class GattServerCharacteristicOperationsMock
: public services::GattServerCharacteristicOperations
{
public:
MOCK_CONST_METHOD2(Update, UpdateStatus(const services::GattServerCharacteristicOperationsObserver& characteristic, infra::ConstByteRange data));
MOCK_METHOD(UpdateStatus, Update, (const services::GattServerCharacteristicOperationsObserver& characteristic, infra::ConstByteRange data), (const));
};

class GattServerCharacteristicUpdateMock
: public GattServerCharacteristicUpdate
{
public:
MOCK_METHOD2(Update, void(infra::ConstByteRange data, infra::Function<void()> onDone));
MOCK_METHOD(void, Update, (infra::ConstByteRange data, infra::Function<void()> onDone));
};

class GattServerCharacteristicMock
: public GattServerCharacteristic
{
public:
MOCK_CONST_METHOD0(ServiceHandle, AttAttribute::Handle());
MOCK_CONST_METHOD0(CharacteristicHandle, AttAttribute::Handle());

MOCK_METHOD2(Update, void(infra::ConstByteRange data, infra::Function<void()> onDone));
MOCK_METHOD(AttAttribute::Handle, ServiceHandle, (), (const));
MOCK_METHOD(AttAttribute::Handle, CharacteristicHandle, (), (const));
MOCK_METHOD(void, Update, (infra::ConstByteRange data, infra::Function<void()> onDone));
};
}

#endif
#endif
EkelmansPh marked this conversation as resolved.
Show resolved Hide resolved