Change boost::json to json in unittests (#831)

This commit is contained in:
Peter Chen
2023-09-11 07:39:38 -04:00
committed by GitHub
parent d7f36733bc
commit 92e5c4792b
12 changed files with 130 additions and 129 deletions

View File

@@ -164,7 +164,7 @@ TEST_F(RPCAccountOffersHandlerTest, LedgerNotFoundViaHash)
ON_CALL(*rawBackendPtr, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
.WillByDefault(Return(std::optional<ripple::LedgerInfo>{}));
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"ledger_hash":"{}"
@@ -191,7 +191,7 @@ TEST_F(RPCAccountOffersHandlerTest, LedgerNotFoundViaStringIndex)
// return empty ledgerinfo
ON_CALL(*rawBackendPtr, fetchLedgerBySequence(seq, _)).WillByDefault(Return(std::optional<ripple::LedgerInfo>{}));
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"ledger_index":"{}"
@@ -218,7 +218,7 @@ TEST_F(RPCAccountOffersHandlerTest, LedgerNotFoundViaIntIndex)
// return empty ledgerinfo
ON_CALL(*rawBackendPtr, fetchLedgerBySequence(seq, _)).WillByDefault(Return(std::optional<ripple::LedgerInfo>{}));
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"ledger_index":{}
@@ -247,7 +247,7 @@ TEST_F(RPCAccountOffersHandlerTest, AccountNotFound)
ON_CALL(*rawBackendPtr, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
EXPECT_CALL(*rawBackendPtr, doFetchLedgerObject).Times(1);
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}"
}})",
@@ -324,7 +324,7 @@ TEST_F(RPCAccountOffersHandlerTest, DefaultParams)
ON_CALL(*rawBackendPtr, doFetchLedgerObjects).WillByDefault(Return(bbs));
EXPECT_CALL(*rawBackendPtr, doFetchLedgerObjects).Times(1);
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}"
}})",
@@ -374,7 +374,7 @@ TEST_F(RPCAccountOffersHandlerTest, Limit)
ON_CALL(*rawBackendPtr, doFetchLedgerObjects).WillByDefault(Return(bbs));
EXPECT_CALL(*rawBackendPtr, doFetchLedgerObjects).Times(1);
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"limit":10
@@ -429,7 +429,7 @@ TEST_F(RPCAccountOffersHandlerTest, Marker)
ON_CALL(*rawBackendPtr, doFetchLedgerObjects).WillByDefault(Return(bbs));
EXPECT_CALL(*rawBackendPtr, doFetchLedgerObjects).Times(1);
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"marker":"{},{}"
@@ -467,7 +467,7 @@ TEST_F(RPCAccountOffersHandlerTest, MarkerNotExists)
ON_CALL(*rawBackendPtr, doFetchLedgerObject(hintIndex, ledgerSeq, _)).WillByDefault(Return(std::nullopt));
EXPECT_CALL(*rawBackendPtr, doFetchLedgerObject).Times(2);
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"marker":"{},{}"
@@ -524,7 +524,7 @@ TEST_F(RPCAccountOffersHandlerTest, LimitLessThanMin)
ON_CALL(*rawBackendPtr, doFetchLedgerObjects).WillByDefault(Return(bbs));
EXPECT_CALL(*rawBackendPtr, doFetchLedgerObjects).Times(1);
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"limit":{}
@@ -578,7 +578,7 @@ TEST_F(RPCAccountOffersHandlerTest, LimitMoreThanMax)
ON_CALL(*rawBackendPtr, doFetchLedgerObjects).WillByDefault(Return(bbs));
EXPECT_CALL(*rawBackendPtr, doFetchLedgerObjects).Times(1);
auto const static input = boost::json::parse(fmt::format(
auto const static input = json::parse(fmt::format(
R"({{
"account":"{}",
"limit":{}