rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ripple::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 ripple::test::jtx::rpc:
Collaboration graph
[legend]

Public Member Functions

 rpc (error_code_i 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< error_code_icode_
 
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 15 of file rpc.h.

Constructor & Destructor Documentation

◆ rpc() [1/2]

ripple::test::jtx::rpc::rpc ( error_code_i  code,
std::optional< std::string m = {} 
)
explicit

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

Definition at line 25 of file rpc.h.

◆ rpc() [2/2]

ripple::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 31 of file rpc.h.

Member Function Documentation

◆ operator()()

void ripple::test::jtx::rpc::operator() ( Env ,
JTx jt 
) const

Definition at line 39 of file rpc.h.

Member Data Documentation

◆ code_

std::optional<error_code_i> ripple::test::jtx::rpc::code_
private

Definition at line 18 of file rpc.h.

◆ errorMessage_

std::optional<std::string> ripple::test::jtx::rpc::errorMessage_
private

Definition at line 19 of file rpc.h.

◆ error_

std::optional<std::string> ripple::test::jtx::rpc::error_
private

Definition at line 20 of file rpc.h.

◆ errorException_

std::optional<std::string> ripple::test::jtx::rpc::errorException_
private

Definition at line 21 of file rpc.h.