Ed Tanous | c5ba4c2 | 2022-02-07 09:59:55 -0800 | [diff] [blame] | 1 | #include "registries.hpp" |
| 2 | |
| 3 | #include "gmock/gmock.h" |
| 4 | |
Nan Zhou | 38ead5e | 2022-07-03 23:07:27 +0000 | [diff] [blame^] | 5 | namespace redfish::registries |
| 6 | { |
| 7 | namespace |
| 8 | { |
| 9 | |
Ed Tanous | c5ba4c2 | 2022-02-07 09:59:55 -0800 | [diff] [blame] | 10 | TEST(RedfishRegistries, fillMessageArgs) |
| 11 | { |
Ed Tanous | c5ba4c2 | 2022-02-07 09:59:55 -0800 | [diff] [blame] | 12 | std::string toFill("%1"); |
| 13 | fillMessageArgs({{"foo"}}, toFill); |
| 14 | EXPECT_EQ(toFill, "foo"); |
| 15 | |
| 16 | toFill = ""; |
| 17 | fillMessageArgs({}, toFill); |
| 18 | EXPECT_EQ(toFill, ""); |
| 19 | |
| 20 | toFill = "%1, %2"; |
| 21 | fillMessageArgs({{"foo", "bar"}}, toFill); |
| 22 | EXPECT_EQ(toFill, "foo, bar"); |
| 23 | } |
Nan Zhou | 38ead5e | 2022-07-03 23:07:27 +0000 | [diff] [blame^] | 24 | } // namespace |
| 25 | } // namespace redfish::registries |