xrpld
Loading...
Searching...
No Matches
xrpl::test::jtx::Rpc Class Reference

Set the expected result code for a JTx The test will fail if the code doesn't match. More...

#include <rpc.h>

Collaboration diagram for xrpl::test::jtx::Rpc:

Public Member Functions

 Rpc (ErrorCodeI code, std::optional< std::string > m={})
 If there's an error code, we expect an error message.
 Rpc (std::string error, std::optional< std::string > exceptionMessage={})
 If there is not a code, we expect an exception message.
void operator() (Env &, JTx &jt) const

Private Attributes

std::optional< ErrorCodeIcode_
std::optional< std::stringerrorMessage_
std::optional< std::stringerror_
std::optional< std::stringerrorException_

Detailed Description

Set the expected result code for a JTx The test will fail if the code doesn't match.

Definition at line 13 of file rpc.h.

Constructor & Destructor Documentation

◆ Rpc() [1/2]

xrpl::test::jtx::Rpc::Rpc ( ErrorCodeI code,
std::optional< std::string > m = {} )
explicit

If there's an error code, we expect an error message.

Definition at line 23 of file rpc.h.

◆ Rpc() [2/2]

xrpl::test::jtx::Rpc::Rpc ( std::string error,
std::optional< std::string > exceptionMessage = {} )
explicit

If there is not a code, we expect an exception message.

Definition at line 29 of file rpc.h.

Member Function Documentation

◆ operator()()

void xrpl::test::jtx::Rpc::operator() ( Env & ,
JTx & jt ) const

Definition at line 35 of file rpc.h.

Member Data Documentation

◆ code_

std::optional<ErrorCodeI> xrpl::test::jtx::Rpc::code_
private

Definition at line 16 of file rpc.h.

◆ errorMessage_

std::optional<std::string> xrpl::test::jtx::Rpc::errorMessage_
private

Definition at line 17 of file rpc.h.

◆ error_

std::optional<std::string> xrpl::test::jtx::Rpc::error_
private

Definition at line 18 of file rpc.h.

◆ errorException_

std::optional<std::string> xrpl::test::jtx::Rpc::errorException_
private

Definition at line 19 of file rpc.h.