blob: c324fee1d88ef7c71190b543e60c1c872a8b1c9f [file] [log] [blame]
Ed Tanousc5ba4c22022-02-07 09:59:55 -08001#include "registries.hpp"
2
3#include "gmock/gmock.h"
4
Nan Zhou38ead5e2022-07-03 23:07:27 +00005namespace redfish::registries
6{
7namespace
8{
9
Ed Tanousc5ba4c22022-02-07 09:59:55 -080010TEST(RedfishRegistries, fillMessageArgs)
11{
Ed Tanousc5ba4c22022-02-07 09:59:55 -080012 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 Zhou38ead5e2022-07-03 23:07:27 +000024} // namespace
25} // namespace redfish::registries