Ed Tanous | c5ba4c2 | 2022-02-07 09:59:55 -0800 | [diff] [blame^] | 1 | #include "registries.hpp" |
2 | |||||
3 | #include "gmock/gmock.h" | ||||
4 | |||||
5 | TEST(RedfishRegistries, fillMessageArgs) | ||||
6 | { | ||||
7 | using redfish::message_registries::fillMessageArgs; | ||||
8 | std::string toFill("%1"); | ||||
9 | fillMessageArgs({{"foo"}}, toFill); | ||||
10 | EXPECT_EQ(toFill, "foo"); | ||||
11 | |||||
12 | toFill = ""; | ||||
13 | fillMessageArgs({}, toFill); | ||||
14 | EXPECT_EQ(toFill, ""); | ||||
15 | |||||
16 | toFill = "%1, %2"; | ||||
17 | fillMessageArgs({{"foo", "bar"}}, toFill); | ||||
18 | EXPECT_EQ(toFill, "foo, bar"); | ||||
19 | } |