From 9832867f9ed9dbcc7ffbd135291bc54c153640b0 Mon Sep 17 00:00:00 2001 From: Michael Jurkoic Date: Sun, 17 Mar 2024 19:15:29 -0500 Subject: Define a receive method on the WebSocket interface --- test/nostr_service_test.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/nostr_service_test.cpp b/test/nostr_service_test.cpp index 83de3be..d4fc71b 100644 --- a/test/nostr_service_test.cpp +++ b/test/nostr_service_test.cpp @@ -7,11 +7,13 @@ #include #include +using std::function; using std::lock_guard; using std::make_shared; using std::mutex; using std::shared_ptr; using std::string; +using std::tuple; using std::unordered_map; using ::testing::_; using ::testing::Invoke; @@ -23,10 +25,11 @@ class MockWebSocketClient : public client::IWebSocketClient { public: MOCK_METHOD(void, start, (), (override)); MOCK_METHOD(void, stop, (), (override)); - MOCK_METHOD(void, openConnection, (std::string uri), (override)); - MOCK_METHOD(bool, isConnected, (std::string uri), (override)); - MOCK_METHOD((std::tuple), send, (std::string message, std::string uri), (override)); - MOCK_METHOD(void, closeConnection, (std::string uri), (override)); + MOCK_METHOD(void, openConnection, (string uri), (override)); + MOCK_METHOD(bool, isConnected, (string uri), (override)); + MOCK_METHOD((tuple), send, (string message, string uri), (override)); + MOCK_METHOD(void, receive, (string uri, function messageHandler), (override)); + MOCK_METHOD(void, closeConnection, (string uri), (override)); }; class NostrServiceTest : public testing::Test -- cgit