Struct sqlness::ConfigBuilder

source ·
pub struct ConfigBuilder { /* private fields */ }
Expand description

Builder for Config.

Implementations§

Examples found in repository?
examples/bad.rs (line 54)
51
52
53
54
55
56
57
58
59
60
61
62
63
64
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/bad-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}
More examples
Hide additional examples
examples/basic.rs (line 49)
46
47
48
49
50
51
52
53
54
55
56
57
58
59
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/basic-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}

Default value: sql

Default value: output

Default value: result

Default value: -- SQLNESS

Default value: config.toml

Fail this run as soon as one case fails if true

If specified, only run cases containing this string in their names.

Builds a new Config.

Errors

If a required field has not been initialized.

Examples found in repository?
examples/bad.rs (line 55)
51
52
53
54
55
56
57
58
59
60
61
62
63
64
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/bad-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}
More examples
Hide additional examples
examples/basic.rs (line 50)
46
47
48
49
50
51
52
53
54
55
56
57
58
59
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/basic-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.