rippled
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
xrpl::test::Loan_test::VerifyLoanStatus Struct Reference

Helper class to compare the expected state of a loan and loan broker against the data in the ledger. More...

Collaboration diagram for xrpl::test::Loan_test::VerifyLoanStatus:
Collaboration graph
[legend]

Public Member Functions

 VerifyLoanStatus (jtx::Env const &env_, BrokerInfo const &broker_, jtx::Account const &pseudo_, Keylet const &keylet_)
 
void checkBroker (Number const &principalOutstanding, Number const &interestOwed, TenthBips32 interestRate, std::uint32_t paymentInterval, std::uint32_t paymentsRemaining, std::uint32_t ownerCount) const
 Checks the expected broker state against the ledger.
 
void checkPayment (std::int32_t loanScale, jtx::Account const &account, jtx::PrettyAmount const &balanceBefore, STAmount const &expectedPayment, jtx::PrettyAmount const &adjustment) const
 
void operator() (std::uint32_t previousPaymentDate, std::uint32_t nextPaymentDate, std::uint32_t paymentRemaining, Number const &loanScale, Number const &totalValue, Number const &principalOutstanding, Number const &managementFeeOutstanding, Number const &periodicPayment, std::uint32_t flags) const
 Checks both the loan and broker expect states against the ledger.
 
void operator() (LoanState const &state) const
 Checks both the loan and broker expect states against the ledger.
 

Public Attributes

jtx::Env const & env
 
BrokerInfo const & broker
 
jtx::Account const & pseudoAccount
 
Keylet const & loanKeylet
 

Detailed Description

Helper class to compare the expected state of a loan and loan broker against the data in the ledger.

Definition at line 258 of file Loan_test.cpp.

Constructor & Destructor Documentation

◆ VerifyLoanStatus()

xrpl::test::Loan_test::VerifyLoanStatus::VerifyLoanStatus ( jtx::Env const &  env_,
BrokerInfo const &  broker_,
jtx::Account const &  pseudo_,
Keylet const &  keylet_ 
)

Definition at line 266 of file Loan_test.cpp.

Member Function Documentation

◆ checkBroker()

void xrpl::test::Loan_test::VerifyLoanStatus::checkBroker ( Number const &  principalOutstanding,
Number const &  interestOwed,
TenthBips32  interestRate,
std::uint32_t  paymentInterval,
std::uint32_t  paymentsRemaining,
std::uint32_t  ownerCount 
) const

Checks the expected broker state against the ledger.

Definition at line 281 of file Loan_test.cpp.

◆ checkPayment()

void xrpl::test::Loan_test::VerifyLoanStatus::checkPayment ( std::int32_t  loanScale,
jtx::Account const &  account,
jtx::PrettyAmount const &  balanceBefore,
STAmount const &  expectedPayment,
jtx::PrettyAmount const &  adjustment 
) const

Definition at line 334 of file Loan_test.cpp.

◆ operator()() [1/2]

void xrpl::test::Loan_test::VerifyLoanStatus::operator() ( std::uint32_t  previousPaymentDate,
std::uint32_t  nextPaymentDate,
std::uint32_t  paymentRemaining,
Number const &  loanScale,
Number const &  totalValue,
Number const &  principalOutstanding,
Number const &  managementFeeOutstanding,
Number const &  periodicPayment,
std::uint32_t  flags 
) const

Checks both the loan and broker expect states against the ledger.

Definition at line 360 of file Loan_test.cpp.

◆ operator()() [2/2]

void xrpl::test::Loan_test::VerifyLoanStatus::operator() ( LoanState const &  state) const

Checks both the loan and broker expect states against the ledger.

Definition at line 431 of file Loan_test.cpp.

Member Data Documentation

◆ env

jtx::Env const& xrpl::test::Loan_test::VerifyLoanStatus::env

Definition at line 261 of file Loan_test.cpp.

◆ broker

BrokerInfo const& xrpl::test::Loan_test::VerifyLoanStatus::broker

Definition at line 262 of file Loan_test.cpp.

◆ pseudoAccount

jtx::Account const& xrpl::test::Loan_test::VerifyLoanStatus::pseudoAccount

Definition at line 263 of file Loan_test.cpp.

◆ loanKeylet

Keylet const& xrpl::test::Loan_test::VerifyLoanStatus::loanKeylet

Definition at line 264 of file Loan_test.cpp.