pub struct Test { /* private fields */ }Expand description
A section of a Report describing a test that was
conducted.
Implementations§
Source§impl Test
impl Test
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
Gets the title from the Test.
§Examples
use bitbelay_report::section::test;
use bitbelay_report::section::test::module::Result;
use bitbelay_report::section::test::Module;
use bitbelay_report::Builder;
let result = test::Builder::default()
.title("Foo")?
.description("Bar")?
.push_module(Module::new(Result::Inconclusive, "Baz", None, None))
.try_build()?;
assert_eq!(result.title(), "Foo");
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Gets the description from the Test.
§Examples
use bitbelay_report::section::test;
use bitbelay_report::section::test::module::Result;
use bitbelay_report::section::test::Module;
use bitbelay_report::Builder;
let result = test::Builder::default()
.title("Foo")?
.description("Bar")?
.push_module(Module::new(Result::Inconclusive, "Baz", None, None))
.try_build()?;
assert_eq!(result.description(), "Bar");
Sourcepub fn modules(&self) -> &NonEmpty<Module>
pub fn modules(&self) -> &NonEmpty<Module>
Gets the Modules from the Test.
§Examples
use bitbelay_report::section::test;
use bitbelay_report::section::test::module::Result;
use bitbelay_report::section::test::Module;
use bitbelay_report::Builder;
let module = Module::new(Result::Inconclusive, "Baz", None, None);
let result = test::Builder::default()
.title("Foo")?
.description("Bar")?
.push_module(module.clone())
.try_build()?;
assert_eq!(result.modules().len(), 1);
assert_eq!(result.modules().first(), &module);
Trait Implementations§
impl Eq for Test
impl StructuralPartialEq for Test
Auto Trait Implementations§
impl Freeze for Test
impl RefUnwindSafe for Test
impl Send for Test
impl Sync for Test
impl Unpin for Test
impl UnwindSafe for Test
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more