pub struct TestCaseBuilder {
pub testcase: TestCase,
}Expand description
Builder for TestCase objects.
Fields§
§testcase: TestCaseImplementations§
Source§impl TestCaseBuilder
Auto-generated by derive_getters::Getters.
impl TestCaseBuilder
Auto-generated by derive_getters::Getters.
Source§impl TestCaseBuilder
impl TestCaseBuilder
Sourcepub fn success(name: &str, time: Duration) -> Self
pub fn success(name: &str, time: Duration) -> Self
Creates a new TestCaseBuilder for a successful TestCase
Sourcepub fn set_classname(&mut self, classname: &str) -> &mut Self
pub fn set_classname(&mut self, classname: &str) -> &mut Self
Set the classname for the TestCase
Sourcepub fn set_filepath(&mut self, filepath: &str) -> &mut Self
pub fn set_filepath(&mut self, filepath: &str) -> &mut Self
Set the file for the TestCase
Sourcepub fn set_system_out(&mut self, system_out: &str) -> &mut Self
pub fn set_system_out(&mut self, system_out: &str) -> &mut Self
Set the system_out for the TestCase
Sourcepub fn set_system_err(&mut self, system_err: &str) -> &mut Self
pub fn set_system_err(&mut self, system_err: &str) -> &mut Self
Set the system_err for the TestCase
Sourcepub fn set_trace(&mut self, trace: &str) -> &mut Self
pub fn set_trace(&mut self, trace: &str) -> &mut Self
Set the result.trace for the TestCase
It has no effect on successful TestCases.
Sourcepub fn error(name: &str, time: Duration, type_: &str, message: &str) -> Self
pub fn error(name: &str, time: Duration, type_: &str, message: &str) -> Self
Creates a new TestCaseBuilder for an erroneous TestCase
An erroneous TestCase is one that encountered an unexpected error condition.
Sourcepub fn failure(name: &str, time: Duration, type_: &str, message: &str) -> Self
pub fn failure(name: &str, time: Duration, type_: &str, message: &str) -> Self
Creates a new TestCaseBuilder for a failed TestCase
A failed TestCase is one where an explicit assertion failed
Sourcepub fn skipped(name: &str) -> Self
pub fn skipped(name: &str) -> Self
Creates a new TestCaseBuilder for an ignored TestCase
An ignored TestCase is one where an ignored or skipped
Sourcepub fn skipped_with_cause(name: &str, type_: &str, message: &str) -> Self
pub fn skipped_with_cause(name: &str, type_: &str, message: &str) -> Self
Creates a new TestCaseBuilder for an ignored TestCase, with a cause
An ignored TestCase is one where an ignored or skipped
Trait Implementations§
Source§impl Clone for TestCaseBuilder
impl Clone for TestCaseBuilder
Source§fn clone(&self) -> TestCaseBuilder
fn clone(&self) -> TestCaseBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more