xrpld
Loading...
Searching...
No Matches
MPTokenIssuanceEntry.cpp
1#include <xrpl/ledger/entries/MPTokenIssuanceEntry.h>
2
3#include <xrpl/protocol/Indexes.h>
4#include <xrpl/protocol/UintTypes.h>
5
6#include <gtest/gtest.h>
7#include <ledger/EntryTestHelpers.h>
8
9#include <cstdint>
10
11namespace xrpl::test {
12
13TEST(MPTokenIssuanceEntryTests, constructors)
14{
16
17 MPTID const issuanceID = makeMptID(1, e.alice.id());
18
20 e,
22 "mptokenIssuance(seq, issuer)",
24 e.alice.id());
25
27 e, keylet::mptokenIssuance(issuanceID), "mptokenIssuance(MPTID)", issuanceID);
28
30 e, keylet::mptokenIssuance(e.someID()), "mptokenIssuance(UInt256)", e.someID());
31}
32
33} // namespace xrpl::test
Scaffolding shared by the per-entry-type suites.
UInt256 someID() const
An arbitrary but stable UInt256, for the entry constructors that take an object ID directly.
AccountID id() const
Returns the Account ID.
Keylet mptokenIssuance(MPTID const &issuanceID) noexcept
Definition Indexes.cpp:567
TEST(UnitsTest, types)
Definition Units.cpp:16
void expectKeylet(EntryTestEnv &e, Keylet const &expected, std::string const &what, Args const &... args)
Assert that both flavors of Entry built from args resolve the ledger object that expected names.
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
Definition UintTypes.h:54
MPTID makeMptID(std::uint32_t const sequence, AccountID const &account)
Definition Indexes.cpp:206