18#include <xrpld/rpc/detail/RPCHelpers.h>
20#include <xrpl/beast/unit_test.h>
21#include <xrpl/protocol/jss.h>
38 BEAST_EXPECT(result.second == 0);
43 BEAST_EXPECT(result.first ==
RPC::Status{rpcINVALID_PARAMS});
44 BEAST_EXPECT(result.second == 0);
47 tx[jss::type] =
"MPTokenIssuance";
50 BEAST_EXPECT(result.second == ltMPTOKEN_ISSUANCE);
53 tx[jss::type] =
"mptokenissuance";
56 BEAST_EXPECT(result.second == ltMPTOKEN_ISSUANCE);
59 tx[jss::type] =
"mpt_issuance";
62 BEAST_EXPECT(result.second == ltMPTOKEN_ISSUANCE);
65 tx[jss::type] =
"MPT_Issuance";
67 BEAST_EXPECT(result.first ==
RPC::Status{rpcINVALID_PARAMS});
68 BEAST_EXPECT(result.second == 0);
73 BEAST_EXPECT(result.first ==
RPC::Status{rpcINVALID_PARAMS});
74 BEAST_EXPECT(result.second == 0);
77 tx[jss::type] =
"unknown";
79 BEAST_EXPECT(result.first ==
RPC::Status{rpcINVALID_PARAMS});
80 BEAST_EXPECT(result.second == 0);
90BEAST_DEFINE_TESTSUITE(RPCHelpers, app,
ripple);
testcase_t testcase
Memberspace for declaring test cases.
void testChooseLedgerEntryType()
void run() override
Runs the suite.
@ objectValue
object value (collection of name/value pairs).
std::pair< RPC::Status, LedgerEntryType > chooseLedgerEntryType(Json::Value const ¶ms)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Status represents the results of an operation that might fail.