rippled
Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
ripple::Ticket_test Class Reference
Inheritance diagram for ripple::Ticket_test:
Inheritance graph
[legend]
Collaboration diagram for ripple::Ticket_test:
Collaboration graph
[legend]

Public Member Functions

void run () override
 

Private Member Functions

auto checkTicketMeta (test::jtx::Env &env, bool other_target=false, bool expiration=false)
 validate metadata for a create/cancel ticket transaction and return the 3 or 4 nodes that make-up the metadata (AffectedNodes) More...
 
void testTicketNotEnabled ()
 
void testTicketCancelNonexistent ()
 
void testTicketCreatePreflightFail ()
 
void testTicketCreateNonexistent ()
 
void testTicketToSelf ()
 
void testTicketCancelByCreator ()
 
void testTicketInsufficientReserve ()
 
void testTicketCancelByTarget ()
 
void testTicketWithExpiration ()
 
void testTicketZeroExpiration ()
 
void testTicketWithPastExpiration ()
 
void testTicketAllowExpiration ()
 

Static Private Attributes

static constexpr auto idOne
 

Detailed Description

Definition at line 26 of file Ticket_test.cpp.

Member Function Documentation

◆ checkTicketMeta()

auto ripple::Ticket_test::checkTicketMeta ( test::jtx::Env env,
bool  other_target = false,
bool  expiration = false 
)
private

validate metadata for a create/cancel ticket transaction and return the 3 or 4 nodes that make-up the metadata (AffectedNodes)

Parameters
envcurrent jtx env (meta will be extracted from it)
other_targetflag to indicate whether a Target different from the Account was specified for the ticket (when created)
expirationflag to indicate a cancellation with expiration which causes two of the affected nodes to be swapped (in order).
Return values
std::arraysize 4 of json object values representing each meta node entry. When the transaction was a cancel with differing target and account, there will be 4 complete items, otherwise the last entry will be an empty object

Definition at line 48 of file Ticket_test.cpp.

◆ testTicketNotEnabled()

void ripple::Ticket_test::testTicketNotEnabled ( )
private

Definition at line 108 of file Ticket_test.cpp.

◆ testTicketCancelNonexistent()

void ripple::Ticket_test::testTicketCancelNonexistent ( )
private

Definition at line 120 of file Ticket_test.cpp.

◆ testTicketCreatePreflightFail()

void ripple::Ticket_test::testTicketCreatePreflightFail ( )
private

Definition at line 130 of file Ticket_test.cpp.

◆ testTicketCreateNonexistent()

void ripple::Ticket_test::testTicketCreateNonexistent ( )
private

Definition at line 142 of file Ticket_test.cpp.

◆ testTicketToSelf()

void ripple::Ticket_test::testTicketToSelf ( )
private

Definition at line 159 of file Ticket_test.cpp.

◆ testTicketCancelByCreator()

void ripple::Ticket_test::testTicketCancelByCreator ( )
private

Definition at line 182 of file Ticket_test.cpp.

◆ testTicketInsufficientReserve()

void ripple::Ticket_test::testTicketInsufficientReserve ( )
private

Definition at line 218 of file Ticket_test.cpp.

◆ testTicketCancelByTarget()

void ripple::Ticket_test::testTicketCancelByTarget ( )
private

Definition at line 233 of file Ticket_test.cpp.

◆ testTicketWithExpiration()

void ripple::Ticket_test::testTicketWithExpiration ( )
private

Definition at line 283 of file Ticket_test.cpp.

◆ testTicketZeroExpiration()

void ripple::Ticket_test::testTicketZeroExpiration ( )
private

Definition at line 310 of file Ticket_test.cpp.

◆ testTicketWithPastExpiration()

void ripple::Ticket_test::testTicketWithPastExpiration ( )
private

Definition at line 322 of file Ticket_test.cpp.

◆ testTicketAllowExpiration()

void ripple::Ticket_test::testTicketAllowExpiration ( )
private

Definition at line 351 of file Ticket_test.cpp.

◆ run()

void ripple::Ticket_test::run ( )
override

Definition at line 400 of file Ticket_test.cpp.

Member Data Documentation

◆ idOne

constexpr auto ripple::Ticket_test::idOne
staticconstexprprivate
Initial value:
=
"00000000000000000000000000000000"
"00000000000000000000000000000001"

Definition at line 28 of file Ticket_test.cpp.