-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unit test for rpc client with transfer id map
- Loading branch information
Showing
6 changed files
with
152 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/// @copyright | ||
/// Copyright (C) OpenCyphal Development Team <opencyphal.org> | ||
/// Copyright Amazon.com Inc. or its affiliates. | ||
/// SPDX-License-Identifier: MIT | ||
|
||
#ifndef LIBCYPHAL_TRANSPORT_TRANSFER_ID_MAP_MOCK_HPP_INCLUDED | ||
#define LIBCYPHAL_TRANSPORT_TRANSFER_ID_MAP_MOCK_HPP_INCLUDED | ||
|
||
#include <libcyphal/transport/transfer_id_map.hpp> | ||
|
||
#include <gmock/gmock.h> | ||
|
||
namespace libcyphal | ||
{ | ||
namespace transport | ||
{ | ||
|
||
class TransferIdMapMock : public ITransferIdMap | ||
{ | ||
public: | ||
TransferIdMapMock() = default; | ||
virtual ~TransferIdMapMock() = default; | ||
|
||
TransferIdMapMock(const TransferIdMapMock&) = delete; | ||
TransferIdMapMock(TransferIdMapMock&&) noexcept = delete; | ||
TransferIdMapMock& operator=(const TransferIdMapMock&) = delete; | ||
TransferIdMapMock& operator=(TransferIdMapMock&&) noexcept = delete; | ||
|
||
MOCK_METHOD(TransferId, getIdFor, (const SessionSpec& session_spec), (const, noexcept, override)); | ||
MOCK_METHOD(void, setIdFor, (const SessionSpec& session_spec, const TransferId transfer_id), (noexcept, override)); | ||
|
||
}; // TransferIdMapMock | ||
|
||
} // namespace transport | ||
} // namespace libcyphal | ||
|
||
#endif // LIBCYPHAL_TRANSPORT_TRANSFER_ID_MAP_MOCK_HPP_INCLUDED |