mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-28 07:35:52 +00:00
style: Put static before type (#2231)
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
using namespace util::config;
|
||||
|
||||
struct BackendCassandraFactoryTest : SyncAsioContextTest, util::prometheus::WithPrometheus {
|
||||
constexpr static auto kKEYSPACE = "factory_test";
|
||||
static constexpr auto kKEYSPACE = "factory_test";
|
||||
|
||||
protected:
|
||||
ClioConfigDefinition cfg_{
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
void
|
||||
writeTxIndexExample(std::string const& hash, std::string const& txType)
|
||||
{
|
||||
auto static kINSERT_TX_INDEX_EXAMPLE = [this]() {
|
||||
static auto kINSERT_TX_INDEX_EXAMPLE = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
INSERT INTO {}
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
std::optional<std::string>
|
||||
fetchTxTypeViaID(std::string const& hash, boost::asio::yield_context ctx)
|
||||
{
|
||||
auto static kFETCH_TX_TYPE = [this]() {
|
||||
static auto kFETCH_TX_TYPE = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
SELECT tx_type FROM {} WHERE hash = ?
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
std::optional<std::uint64_t>
|
||||
fetchTxIndexTableSize(boost::asio::yield_context ctx)
|
||||
{
|
||||
auto static kINSERT_TX_INDEX_EXAMPLE = [this]() {
|
||||
static auto kINSERT_TX_INDEX_EXAMPLE = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
SELECT COUNT(*) FROM {}
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
void
|
||||
writeLedgerAccountHash(std::uint64_t sequence, std::string const& accountHash)
|
||||
{
|
||||
auto static kINSERT_LEDGER_EXAMPLE = [this]() {
|
||||
static auto kINSERT_LEDGER_EXAMPLE = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
INSERT INTO {}
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
std::optional<ripple::uint256>
|
||||
fetchAccountHashViaSequence(std::uint64_t sequence, boost::asio::yield_context ctx)
|
||||
{
|
||||
auto static kFETCH_ACCOUNT_HASH = [this]() {
|
||||
static auto kFETCH_ACCOUNT_HASH = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
SELECT account_hash FROM {} WHERE sequence = ?
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
std::optional<std::uint64_t>
|
||||
fetchLedgerTableSize(boost::asio::yield_context ctx)
|
||||
{
|
||||
auto static kINSERT_LEDGER_EXAMPLE = [this]() {
|
||||
static auto kINSERT_LEDGER_EXAMPLE = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
SELECT COUNT(*) FROM {}
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
std::optional<std::uint64_t>
|
||||
fetchDiffTableSize(boost::asio::yield_context ctx)
|
||||
{
|
||||
auto static kCOUNT_DIFF = [this]() {
|
||||
static auto kCOUNT_DIFF = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
SELECT COUNT(*) FROM {}
|
||||
|
||||
@@ -62,7 +62,7 @@ using namespace util::config;
|
||||
using testing::Return;
|
||||
using namespace util::prometheus;
|
||||
|
||||
constexpr static auto const kTWO_SOURCES_LEDGER_RESPONSE = R"JSON({
|
||||
static constexpr auto kTWO_SOURCES_LEDGER_RESPONSE = R"JSON({
|
||||
"etl_sources": [
|
||||
{
|
||||
"ip": "127.0.0.1",
|
||||
@@ -77,7 +77,7 @@ constexpr static auto const kTWO_SOURCES_LEDGER_RESPONSE = R"JSON({
|
||||
]
|
||||
})JSON";
|
||||
|
||||
constexpr static auto const kTHREE_SOURCES_LEDGER_RESPONSE = R"JSON({
|
||||
static constexpr auto kTHREE_SOURCES_LEDGER_RESPONSE = R"JSON({
|
||||
"etl_sources": [
|
||||
{
|
||||
"ip": "127.0.0.1",
|
||||
|
||||
@@ -42,7 +42,7 @@ protected:
|
||||
|
||||
TEST_F(AmendmentBlockHandlerNgTests, CallTonotifyAmendmentBlockedSetsStateAndRepeatedlyCallsAction)
|
||||
{
|
||||
constexpr static auto kMAX_ITERATIONS = 10uz;
|
||||
static constexpr auto kMAX_ITERATIONS = 10uz;
|
||||
etlng::impl::AmendmentBlockHandler handler{ctx_, state_, std::chrono::nanoseconds{1}, actionMock_.AsStdFunction()};
|
||||
auto counter = 0uz;
|
||||
std::binary_semaphore stop{0};
|
||||
|
||||
@@ -179,7 +179,7 @@ TEST_F(RPCAMMInfoHandlerTest, AccountNotFound)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(accountKey, testing::_, testing::_))
|
||||
.WillByDefault(Return(accountRoot.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}",
|
||||
"account": "{}"
|
||||
@@ -205,7 +205,7 @@ TEST_F(RPCAMMInfoHandlerTest, AMMAccountNotExist)
|
||||
ON_CALL(*backend_, fetchLedgerBySequence).WillByDefault(Return(lgrInfo));
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -228,7 +228,7 @@ TEST_F(RPCAMMInfoHandlerTest, AMMAccountNotInDBIsMalformed)
|
||||
ON_CALL(*backend_, fetchLedgerBySequence).WillByDefault(Return(lgrInfo));
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -254,7 +254,7 @@ TEST_F(RPCAMMInfoHandlerTest, AMMAccountNotFoundMissingAmmField)
|
||||
ON_CALL(*backend_, fetchLedgerBySequence).WillByDefault(Return(lgrInfo));
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(accountRoot.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -289,7 +289,7 @@ TEST_F(RPCAMMInfoHandlerTest, AMMAccountAmmBlobNotFound)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(ammKeylet.key, testing::_, testing::_))
|
||||
.WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -328,7 +328,7 @@ TEST_F(RPCAMMInfoHandlerTest, AMMAccountAccBlobNotFound)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(account2Key, testing::_, testing::_))
|
||||
.WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -373,7 +373,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathMinimalFirstXRPNoTrustline)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(feesKey, kSEQ, _)).WillByDefault(Return(feesObj));
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _)).WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -453,7 +453,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithAccount)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(accountHoldsKeylet.key, kSEQ, _))
|
||||
.WillByDefault(Return(trustline.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}",
|
||||
"account": "{}"
|
||||
@@ -527,7 +527,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathMinimalSecondXRPNoTrustline)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(feesKey, kSEQ, _)).WillByDefault(Return(feesObj));
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _)).WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -597,7 +597,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathNonXRPNoTrustlines)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(feesKey, kSEQ, _)).WillByDefault(Return(feesObj));
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _)).WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -686,7 +686,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathFrozen)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _))
|
||||
.WillByDefault(Return(trustline2BalanceFrozen.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -776,7 +776,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathFrozenIssuer)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _))
|
||||
.WillByDefault(Return(trustline2BalanceFrozen.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -858,7 +858,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithTrustline)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _))
|
||||
.WillByDefault(Return(trustlineBalance.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -935,7 +935,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithVoteSlots)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _))
|
||||
.WillByDefault(Return(trustlineBalance.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -1028,7 +1028,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithAuctionSlot)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issue2LineKey, kSEQ, _))
|
||||
.WillByDefault(Return(trustlineBalance.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"amm_account": "{}"
|
||||
}})JSON",
|
||||
@@ -1116,7 +1116,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithAssetsMatchingInputOrder)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(ammKeylet.key, testing::_, testing::_))
|
||||
.WillByDefault(Return(ammObj.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"asset": {{
|
||||
"currency": "JPY",
|
||||
@@ -1226,7 +1226,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithAssetsPreservesInputOrder)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(ammKeylet.key, testing::_, testing::_))
|
||||
.WillByDefault(Return(ammObj.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"asset": {{
|
||||
"currency": "USD",
|
||||
|
||||
@@ -73,7 +73,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, AccountNotExist)
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -95,7 +95,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, LedgerNonExistViaIntSequence)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(30, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -119,7 +119,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, LedgerNonExistViaStringSequence)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(12, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":"{}"
|
||||
@@ -144,7 +144,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, LedgerNonExistViaHash)
|
||||
ON_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _))
|
||||
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_hash":"{}"
|
||||
@@ -210,7 +210,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, DefaultParameter)
|
||||
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -245,7 +245,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, RequestViaLegderHash)
|
||||
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_hash":"{}"
|
||||
@@ -282,7 +282,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, RequestViaLegderSeq)
|
||||
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":{}
|
||||
|
||||
@@ -187,7 +187,7 @@ TEST_F(RPCAccountInfoHandlerTest, LedgerNonExistViaIntSequence)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(30, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index": 30
|
||||
@@ -210,7 +210,7 @@ TEST_F(RPCAccountInfoHandlerTest, LedgerNonExistViaStringSequence)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(30, _)).WillByDefault(Return(std::nullopt));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index": "30"
|
||||
@@ -234,7 +234,7 @@ TEST_F(RPCAccountInfoHandlerTest, LedgerNonExistViaHash)
|
||||
ON_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _))
|
||||
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_hash": "{}"
|
||||
@@ -261,7 +261,7 @@ TEST_F(RPCAccountInfoHandlerTest, AccountNotExist)
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}"
|
||||
}})JSON",
|
||||
@@ -287,7 +287,7 @@ TEST_F(RPCAccountInfoHandlerTest, AccountInvalid)
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}"
|
||||
}})JSON",
|
||||
@@ -321,7 +321,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsInvalid)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::Clawback, _)).WillOnce(Return(false));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"signer_lists": true
|
||||
@@ -424,7 +424,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV2)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::Clawback, _)).WillOnce(Return(false));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"signer_lists": true
|
||||
@@ -525,7 +525,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV1)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::Clawback, _)).WillOnce(Return(false));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"signer_lists": true
|
||||
@@ -599,7 +599,7 @@ TEST_F(RPCAccountInfoHandlerTest, Flags)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::Clawback, _)).WillOnce(Return(false));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}"
|
||||
}})JSON",
|
||||
@@ -628,7 +628,7 @@ TEST_F(RPCAccountInfoHandlerTest, IdentAndSignerListsFalse)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::Clawback, _)).WillOnce(Return(false));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"ident": "{}"
|
||||
}})JSON",
|
||||
@@ -706,7 +706,7 @@ TEST_F(RPCAccountInfoHandlerTest, DisallowIncoming)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::Clawback, _)).WillOnce(Return(false));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}"
|
||||
}})JSON",
|
||||
@@ -780,7 +780,7 @@ TEST_F(RPCAccountInfoHandlerTest, Clawback)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::Clawback, _)).WillOnce(Return(true));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}"
|
||||
}})JSON",
|
||||
|
||||
@@ -181,7 +181,7 @@ TEST_F(RPCAccountNFTsHandlerTest, LedgerNotFoundViaHash)
|
||||
ON_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _))
|
||||
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_hash":"{}"
|
||||
@@ -207,7 +207,7 @@ TEST_F(RPCAccountNFTsHandlerTest, LedgerNotFoundViaStringIndex)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":"{}"
|
||||
@@ -233,7 +233,7 @@ TEST_F(RPCAccountNFTsHandlerTest, LedgerNotFoundViaIntIndex)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":{}
|
||||
@@ -260,7 +260,7 @@ TEST_F(RPCAccountNFTsHandlerTest, AccountNotFound)
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -323,7 +323,7 @@ TEST_F(RPCAccountNFTsHandlerTest, NormalPath)
|
||||
.WillByDefault(Return(pageObject.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -357,7 +357,7 @@ TEST_F(RPCAccountNFTsHandlerTest, Limit)
|
||||
.WillByDefault(Return(pageObject.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1 + kLIMIT);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
@@ -392,7 +392,7 @@ TEST_F(RPCAccountNFTsHandlerTest, Marker)
|
||||
.WillByDefault(Return(pageObject.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{}"
|
||||
@@ -419,7 +419,7 @@ TEST_F(RPCAccountNFTsHandlerTest, InvalidMarker)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(ripple::keylet::account(accountID).key, 30, _))
|
||||
.WillByDefault(Return(accountObject.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{}"
|
||||
@@ -448,7 +448,7 @@ TEST_F(RPCAccountNFTsHandlerTest, AccountWithNoNFT)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(ripple::keylet::account(accountID).key, 30, _))
|
||||
.WillByDefault(Return(accountObject.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -480,7 +480,7 @@ TEST_F(RPCAccountNFTsHandlerTest, invalidPage)
|
||||
.WillByDefault(Return(accountObject.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{}"
|
||||
@@ -546,7 +546,7 @@ TEST_F(RPCAccountNFTsHandlerTest, LimitLessThanMin)
|
||||
.WillByDefault(Return(pageObject.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
@@ -610,7 +610,7 @@ TEST_F(RPCAccountNFTsHandlerTest, LimitMoreThanMax)
|
||||
.WillByDefault(Return(pageObject.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
|
||||
@@ -223,7 +223,7 @@ TEST_F(RPCAccountObjectsHandlerTest, LedgerNonExistViaIntSequence)
|
||||
// return empty ledgerHeader
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence(kMAX_SEQ, _)).WillOnce(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":30
|
||||
@@ -245,7 +245,7 @@ TEST_F(RPCAccountObjectsHandlerTest, LedgerNonExistViaStringSequence)
|
||||
// return empty ledgerHeader
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence(kMAX_SEQ, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":"30"
|
||||
@@ -268,7 +268,7 @@ TEST_F(RPCAccountObjectsHandlerTest, LedgerNonExistViaHash)
|
||||
EXPECT_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _))
|
||||
.WillOnce(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_hash":"{}"
|
||||
@@ -293,7 +293,7 @@ TEST_F(RPCAccountObjectsHandlerTest, AccountNotExist)
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence).WillOnce(Return(ledgerHeader));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).WillOnce(Return(std::optional<Blob>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -365,7 +365,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DefaultParameterNoNFTFound)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -409,7 +409,7 @@ TEST_F(RPCAccountObjectsHandlerTest, Limit)
|
||||
}
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
@@ -453,7 +453,7 @@ TEST_F(RPCAccountObjectsHandlerTest, Marker)
|
||||
}
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{},{}"
|
||||
@@ -507,7 +507,7 @@ TEST_F(RPCAccountObjectsHandlerTest, MultipleDirNoNFT)
|
||||
}
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
@@ -561,7 +561,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilter)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"type":"offer"
|
||||
@@ -605,7 +605,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterAmmType)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"type": "amm"
|
||||
@@ -658,7 +658,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterReturnEmpty)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"type": "check"
|
||||
@@ -713,7 +713,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DeletionBlockersOnlyFilter)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"deletion_blockers_only": true
|
||||
@@ -756,7 +756,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DeletionBlockersOnlyFilterWithTypeFilter)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"deletion_blockers_only": true,
|
||||
@@ -818,7 +818,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DeletionBlockersOnlyFilterEmptyResult)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"deletion_blockers_only": true
|
||||
@@ -878,7 +878,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DeletionBlockersOnlyFilterWithIncompatibleT
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"deletion_blockers_only": true,
|
||||
@@ -992,7 +992,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMixOtherObjects)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -1031,7 +1031,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTReachLimitReturnMarker)
|
||||
current = previous;
|
||||
}
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
@@ -1080,7 +1080,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTReachLimitNoMarker)
|
||||
);
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(current, 30, _)).WillOnce(Return(nftpage11.getSerializer().peekData()));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
@@ -1158,7 +1158,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMarker)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{},{}"
|
||||
@@ -1214,7 +1214,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMarkerNoMoreNFT)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{},{}"
|
||||
@@ -1242,7 +1242,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMarkerNotInRange)
|
||||
auto const accountKk = ripple::keylet::account(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(accountKk, kMAX_SEQ, _)).WillOnce(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"marker" : "{},{}"
|
||||
@@ -1275,7 +1275,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMarkerNotExist)
|
||||
auto const accountNftMax = ripple::keylet::nftpage_max(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(accountNftMax, kMAX_SEQ, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"marker" : "{},{}"
|
||||
@@ -1349,7 +1349,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTLimitAdjust)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{},{}",
|
||||
@@ -1445,7 +1445,7 @@ TEST_F(RPCAccountObjectsHandlerTest, FilterNFT)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"type": "nft_page"
|
||||
@@ -1486,7 +1486,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTZeroMarkerNotAffectOtherMarker)
|
||||
}
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{},
|
||||
@@ -1566,7 +1566,7 @@ TEST_F(RPCAccountObjectsHandlerTest, LimitLessThanMin)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit": {}
|
||||
@@ -1642,7 +1642,7 @@ TEST_F(RPCAccountObjectsHandlerTest, LimitMoreThanMax)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit": {}
|
||||
@@ -1684,7 +1684,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterMPTIssuanceType)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"type": "mpt_issuance"
|
||||
@@ -1733,7 +1733,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterMPTokenType)
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).WillOnce(Return(bbs));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"type": "mptoken"
|
||||
|
||||
@@ -176,7 +176,7 @@ TEST_F(RPCAccountOffersHandlerTest, LedgerNotFoundViaHash)
|
||||
ON_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _))
|
||||
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_hash":"{}"
|
||||
@@ -202,7 +202,7 @@ TEST_F(RPCAccountOffersHandlerTest, LedgerNotFoundViaStringIndex)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":"{}"
|
||||
@@ -228,7 +228,7 @@ TEST_F(RPCAccountOffersHandlerTest, LedgerNotFoundViaIntIndex)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"ledger_index":{}
|
||||
@@ -255,7 +255,7 @@ TEST_F(RPCAccountOffersHandlerTest, AccountNotFound)
|
||||
ON_CALL(*backend_, doFetchLedgerObject).WillByDefault(Return(std::optional<Blob>{}));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -332,7 +332,7 @@ TEST_F(RPCAccountOffersHandlerTest, DefaultParams)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}"
|
||||
}})JSON",
|
||||
@@ -380,7 +380,7 @@ TEST_F(RPCAccountOffersHandlerTest, Limit)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":10
|
||||
@@ -433,7 +433,7 @@ TEST_F(RPCAccountOffersHandlerTest, Marker)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{},{}"
|
||||
@@ -469,7 +469,7 @@ TEST_F(RPCAccountOffersHandlerTest, MarkerNotExists)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(hintIndex, kLEDGER_SEQ, _)).WillByDefault(Return(std::nullopt));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"marker":"{},{}"
|
||||
@@ -527,7 +527,7 @@ TEST_F(RPCAccountOffersHandlerTest, LimitLessThanMin)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
@@ -582,7 +582,7 @@ TEST_F(RPCAccountOffersHandlerTest, LimitMoreThanMax)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account":"{}",
|
||||
"limit":{}
|
||||
|
||||
@@ -512,7 +512,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexSpecificForwardTrue)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -554,7 +554,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexSpecificForwardFalse)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -596,7 +596,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexNotSpecificForwardTrue)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -638,7 +638,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexNotSpecificForwardFalse)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -678,7 +678,7 @@ TEST_F(RPCAccountTxHandlerTest, BinaryTrue)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -732,7 +732,7 @@ TEST_F(RPCAccountTxHandlerTest, BinaryTrueV2)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -784,7 +784,7 @@ TEST_F(RPCAccountTxHandlerTest, LimitAndMarker)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -818,7 +818,7 @@ TEST_F(RPCAccountTxHandlerTest, LimitIsCapped)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -850,7 +850,7 @@ TEST_F(RPCAccountTxHandlerTest, LimitAllowedUpToCap)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -898,7 +898,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificLedgerIndex)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index": {}
|
||||
@@ -924,7 +924,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificNonexistLedgerIntIndex)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index": {}
|
||||
@@ -947,7 +947,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificNonexistLedgerStringIndex)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index": "{}"
|
||||
@@ -989,7 +989,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificLedgerHash)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_hash": "{}"
|
||||
@@ -1033,7 +1033,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificLedgerIndexValidated)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index": "validated"
|
||||
@@ -1071,7 +1071,7 @@ TEST_F(RPCAccountTxHandlerTest, TxLessThanMinSeq)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -1113,7 +1113,7 @@ TEST_F(RPCAccountTxHandlerTest, TxLargerThanMaxSeq)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -1355,7 +1355,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -1603,7 +1603,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{AccountTxHandler{backend_, mockETLServicePtr_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"ledger_index_min": {},
|
||||
|
||||
@@ -74,11 +74,11 @@ using ::testing::Types;
|
||||
using namespace rpc;
|
||||
using TestServerInfoHandler = BaseServerInfoHandler<MockCounters>;
|
||||
|
||||
constexpr static auto kINDEX1 = "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DD";
|
||||
constexpr static auto kAMM_ACCOUNT = "rLcS7XL6nxRAi7JcbJcn1Na179oF3vdfbh";
|
||||
constexpr static auto kACCOUNT = "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn";
|
||||
constexpr static auto kNFT_ID = "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004";
|
||||
constexpr static auto kCURRENCY = "0158415500000000C1F76FF6ECB0BAC600000000";
|
||||
static constexpr auto kINDEX1 = "05FB0EB4B899F056FA095537C5817163801F544BAFCEA39C995D76DB4D16F9DD";
|
||||
static constexpr auto kAMM_ACCOUNT = "rLcS7XL6nxRAi7JcbJcn1Na179oF3vdfbh";
|
||||
static constexpr auto kACCOUNT = "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn";
|
||||
static constexpr auto kNFT_ID = "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004";
|
||||
static constexpr auto kCURRENCY = "0158415500000000C1F76FF6ECB0BAC600000000";
|
||||
|
||||
using AnyHandlerType = Types<
|
||||
AccountChannelsHandler,
|
||||
|
||||
@@ -1495,7 +1495,7 @@ TEST_F(RPCBookOffersHandlerTest, LedgerNonExistViaIntSequence)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(30, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"ledger_index": 30,
|
||||
"taker_gets":
|
||||
@@ -1526,7 +1526,7 @@ TEST_F(RPCBookOffersHandlerTest, LedgerNonExistViaSequence)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(30, _)).WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"ledger_index": "30",
|
||||
"taker_gets":
|
||||
@@ -1558,7 +1558,7 @@ TEST_F(RPCBookOffersHandlerTest, LedgerNonExistViaHash)
|
||||
ON_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _))
|
||||
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"ledger_hash": "{}",
|
||||
"taker_gets":
|
||||
@@ -1635,7 +1635,7 @@ TEST_F(RPCBookOffersHandlerTest, Limit)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"taker_gets":
|
||||
{{
|
||||
@@ -1709,7 +1709,7 @@ TEST_F(RPCBookOffersHandlerTest, LimitMoreThanMax)
|
||||
ON_CALL(*backend_, doFetchLedgerObjects).WillByDefault(Return(bbs));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObjects).Times(1);
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"taker_gets":
|
||||
{{
|
||||
|
||||
@@ -310,7 +310,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardTrue)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -454,7 +454,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV1)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -608,7 +608,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -640,7 +640,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexNotSpecificForwardTrue)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -681,7 +681,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexNotSpecificForwardFalse)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -722,7 +722,7 @@ TEST_F(RPCNFTHistoryHandlerTest, BinaryTrueV1)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -776,7 +776,7 @@ TEST_F(RPCNFTHistoryHandlerTest, BinaryTrueV2)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -827,7 +827,7 @@ TEST_F(RPCNFTHistoryHandlerTest, LimitAndMarker)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -875,7 +875,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificLedgerIndex)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index":{}
|
||||
@@ -901,7 +901,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificNonexistLedgerIntIndex)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index":{}
|
||||
@@ -924,7 +924,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificNonexistLedgerStringIndex)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index":"{}"
|
||||
@@ -964,7 +964,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificLedgerHash)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_hash":"{}"
|
||||
@@ -1002,7 +1002,7 @@ TEST_F(RPCNFTHistoryHandlerTest, TxLessThanMinSeq)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -1043,7 +1043,7 @@ TEST_F(RPCNFTHistoryHandlerTest, TxLargerThanMaxSeq)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
@@ -1084,7 +1084,7 @@ TEST_F(RPCNFTHistoryHandlerTest, LimitMoreThanMax)
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{NFTHistoryHandler{backend_}};
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"nft_id":"{}",
|
||||
"ledger_index_min": {},
|
||||
|
||||
@@ -213,7 +213,7 @@ TEST_F(RPCNoRippleCheckTest, LedgerNotExistViaHash)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerByHash(ripple::uint256{kLEDGER_HASH}, _)).WillByDefault(Return(std::nullopt));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"role": "gateway",
|
||||
@@ -240,7 +240,7 @@ TEST_F(RPCNoRippleCheckTest, LedgerNotExistViaIntIndex)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::nullopt));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"role": "gateway",
|
||||
@@ -267,7 +267,7 @@ TEST_F(RPCNoRippleCheckTest, LedgerNotExistViaStringIndex)
|
||||
// return empty ledgerHeader
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(kSEQ, _)).WillByDefault(Return(std::nullopt));
|
||||
|
||||
auto static const kINPUT = json::parse(fmt::format(
|
||||
static auto const kINPUT = json::parse(fmt::format(
|
||||
R"JSON({{
|
||||
"account": "{}",
|
||||
"role": "gateway",
|
||||
|
||||
@@ -573,7 +573,7 @@ TEST_F(RPCTxTest, ReturnBinaryWithCTID)
|
||||
TEST_F(RPCTxTest, MintNFT)
|
||||
{
|
||||
// Note: `inLedger` is API v1 only. See DefaultOutput_*
|
||||
auto static const kOUT = fmt::format(
|
||||
static auto const kOUT = fmt::format(
|
||||
R"JSON({{
|
||||
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee": "50",
|
||||
@@ -992,7 +992,7 @@ TEST_F(RPCTxTest, NotReturnCTIDIfETLNotAvailable)
|
||||
|
||||
TEST_F(RPCTxTest, ViaCTID)
|
||||
{
|
||||
auto static const kOUT = fmt::format(
|
||||
static auto const kOUT = fmt::format(
|
||||
R"JSON({{
|
||||
"Account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"Fee":"2",
|
||||
|
||||
Reference in New Issue
Block a user