pub struct SimpleTest<A, F> {
pub host_requirements: Option<TestCaseRequirements>,
/* private fields */
}Expand description
A test defined by an artifact resolver function and a run function.
Fields§
§host_requirements: Option<TestCaseRequirements>Optional test requirements
Implementations§
Source§impl<A, AR, F, E> SimpleTest<A, F>
impl<A, AR, F, E> SimpleTest<A, F>
Sourcepub fn new(
leaf_name: &'static str,
resolve: A,
run: F,
host_requirements: Option<TestCaseRequirements>,
) -> Self
pub fn new( leaf_name: &'static str, resolve: A, run: F, host_requirements: Option<TestCaseRequirements>, ) -> Self
Returns a new test with the given leaf_name, resolve, run functions,
and optional requirements.
Trait Implementations§
Source§impl<A, AR, F, E> RunTest for SimpleTest<A, F>
impl<A, AR, F, E> RunTest for SimpleTest<A, F>
Source§fn resolve(&self, resolver: &ArtifactResolver<'_>) -> Option<Self::Artifacts>
fn resolve(&self, resolver: &ArtifactResolver<'_>) -> Option<Self::Artifacts>
Returns the artifacts required by the test. Read more
Source§fn run(
&self,
params: PetriTestParams<'_>,
artifacts: Self::Artifacts,
) -> Result<()>
fn run( &self, params: PetriTestParams<'_>, artifacts: Self::Artifacts, ) -> Result<()>
Runs the test, which has been assigned
name, with the given
artifacts.Source§fn host_requirements(&self) -> Option<&TestCaseRequirements>
fn host_requirements(&self) -> Option<&TestCaseRequirements>
Returns the host requirements of the current test, if any.
Auto Trait Implementations§
impl<A, F> Freeze for SimpleTest<A, F>
impl<A, F> RefUnwindSafe for SimpleTest<A, F>where
A: RefUnwindSafe,
F: RefUnwindSafe,
impl<A, F> Send for SimpleTest<A, F>
impl<A, F> Sync for SimpleTest<A, F>
impl<A, F> Unpin for SimpleTest<A, F>
impl<A, F> UnwindSafe for SimpleTest<A, F>where
A: UnwindSafe,
F: UnwindSafe,
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