blob: b75883c3594261d5cf4ebfee5a82aa7e1e501793 [file] [log] [blame]
Ed Tanousc5ba4c22022-02-07 09:59:55 -08001#include "registries.hpp"
2
3#include "gmock/gmock.h"
4
5TEST(RedfishRegistries, fillMessageArgs)
6{
Ed Tanousfffb8c12022-02-07 23:53:03 -08007 using redfish::registries::fillMessageArgs;
Ed Tanousc5ba4c22022-02-07 09:59:55 -08008 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}