10 #include <gtest/gtest.h>
11 #include <gmock/gmock.h>
13 using namespace ::testing;
14 using namespace ::
daq;
24 pending = PendingReplies::Create();
33 EXPECT_FALSE(pending->HasPendingReplies());
35 auto token = pending->Acquire(
"id",
"req");
36 EXPECT_TRUE(pending->HasPendingReplies());
38 EXPECT_FALSE(pending->HasPendingReplies());
42 EXPECT_FALSE(pending->HasPendingReplies());
44 auto token = pending->Acquire(
"1",
"req");
46 auto token2 = pending->Acquire(
"2",
"req");
48 auto token3 = pending->Acquire(
"3",
"req");
49 auto pending_vec = pending->GetPendingReplies();
52 std::vector<PendingReplies::PendingReply> expected = {{
"1",
"req"}, {
"3",
"req"}};
55 EXPECT_FALSE(pending->HasPendingReplies());
std::shared_ptr< PendingReplies > pending
Test fixture for PendingReplies tests.
Contains declaration for classes related to pending replies.
TEST_F(TestPendingReplies, DeletedReplyTokenReleasesPendingReply)
ASSERT_EQ(meta.keyword_rules.size(), 1u)