Struct sqlness::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }Expand description
Builder for Config.
Implementations§
source§impl ConfigBuilder
impl ConfigBuilder
sourcepub fn case_dir(&mut self, value: String) -> &mut Self
pub fn case_dir(&mut self, value: String) -> &mut Self
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
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();
}sourcepub fn test_case_extension(&mut self, value: String) -> &mut Self
pub fn test_case_extension(&mut self, value: String) -> &mut Self
Default value: sql
sourcepub fn output_result_extension(&mut self, value: String) -> &mut Self
pub fn output_result_extension(&mut self, value: String) -> &mut Self
Default value: output
sourcepub fn expect_result_extension(&mut self, value: String) -> &mut Self
pub fn expect_result_extension(&mut self, value: String) -> &mut Self
Default value: result
sourcepub fn interceptor_prefix(&mut self, value: String) -> &mut Self
pub fn interceptor_prefix(&mut self, value: String) -> &mut Self
Default value: -- SQLNESS
sourcepub fn env_config_file(&mut self, value: String) -> &mut Self
pub fn env_config_file(&mut self, value: String) -> &mut Self
Default value: config.toml
sourcepub fn fail_fast(&mut self, value: bool) -> &mut Self
pub fn fail_fast(&mut self, value: bool) -> &mut Self
Fail this run as soon as one case fails if true
sourcepub fn test_filter(&mut self, value: String) -> &mut Self
pub fn test_filter(&mut self, value: String) -> &mut Self
If specified, only run cases containing this string in their names.
sourcepub fn build(&self) -> Result<Config, ConfigBuilderError>
pub fn build(&self) -> Result<Config, ConfigBuilderError>
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
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§
source§impl Clone for ConfigBuilder
impl Clone for ConfigBuilder
source§fn clone(&self) -> ConfigBuilder
fn clone(&self) -> ConfigBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more