DemandFluency

Trait DemandFluency 

Source
pub trait DemandFluency<T> {
    // Required methods
    fn demand_instruction_error(self, expected_error: InstructionError);
    fn demand_instruction_error_at_index(
        self,
        expected_index: u8,
        expected_error: InstructionError,
    );
    fn demand_logs_contain(self, expected: &str);
    fn demand_system_error(self, expected_error: SystemError);
    fn demand_system_error_at_index(
        self,
        expected_index: u8,
        expected_error: SystemError,
    );
    fn demand_transaction_error(self, expected_error: TransactionError);
}
Expand description

Trait for fluent assertions on transaction results.

This trait extends TransactionResult with assertion methods that provide detailed error messages when conditions are not met. The fluent API allows for readable test code that chains naturally from transaction execution.

See the working examples in the repository for complete usage patterns.

Required Methods§

Source

fn demand_instruction_error(self, expected_error: InstructionError)

Source

fn demand_instruction_error_at_index( self, expected_index: u8, expected_error: InstructionError, )

Source

fn demand_logs_contain(self, expected: &str)

Source

fn demand_system_error(self, expected_error: SystemError)

Source

fn demand_system_error_at_index( self, expected_index: u8, expected_error: SystemError, )

Source

fn demand_transaction_error(self, expected_error: TransactionError)

Implementations on Foreign Types§

Source§

impl DemandFluency<Result<TransactionMetadata, FailedTransactionMetadata>> for TransactionResult

Source§

fn demand_instruction_error(self, expected_error: InstructionError)

Source§

fn demand_instruction_error_at_index( self, expected_index: u8, expected_error: InstructionError, )

Source§

fn demand_logs_contain(self, expected: &str)

Source§

fn demand_system_error(self, expected_error: SystemError)

Source§

fn demand_system_error_at_index( self, expected_index: u8, expected_error: SystemError, )

Source§

fn demand_transaction_error(self, expected_error: TransactionError)

Implementors§