[][src]Trait gluesql::tests::Tester

pub trait Tester {
    fn new(namespace: &str) -> Self;
fn execute(&mut self, query: &Query) -> Result<Payload>; fn run(&mut self, sql: &str) -> Result<Payload> { ... }
fn run_and_print(&mut self, sql: &str) { ... }
fn test_rows(&mut self, sql: &str, count: usize) { ... }
fn test_columns(&mut self, sql: &str, count: usize) { ... }
fn test_error(&mut self, sql: &str, expected: Error) { ... } }

If you want to make your custom storage and want to run integrate tests, you should implement this Tester trait.

To see how to use it,

Actual test cases are in /src/tests/, not in /tests/.

Required methods

fn new(namespace: &str) -> Self

fn execute(&mut self, query: &Query) -> Result<Payload>

Loading content...

Provided methods

fn run(&mut self, sql: &str) -> Result<Payload>

fn run_and_print(&mut self, sql: &str)

fn test_rows(&mut self, sql: &str, count: usize)

fn test_columns(&mut self, sql: &str, count: usize)

fn test_error(&mut self, sql: &str, expected: Error)

Loading content...

Implementors

Loading content...