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();
51 ASSERT_EQ(2u, pending_vec.size());
52 std::vector<PendingReplies::PendingReply> expected = {{
"1",
"req"}, {
"3",
"req"}};
55 EXPECT_FALSE(pending->HasPendingReplies());