pub enum Expectation {
Holds(Core),
PageContains {
needle: Core,
actor: Option<Arc<str>>,
},
PageMatchesSnapshot {
name: Option<Arc<str>>,
actor: Option<Arc<str>>,
},
FoldEquals {
events: Core,
actor: Option<Arc<str>>,
},
Place {
what: Arc<str>,
tier: Tier,
},
Flow {
ty: Arc<str>,
tier: Tier,
},
WireCompatible {
path: Arc<str>,
},
Performed {
atom: Effect,
how: Count,
},
}Variants§
Holds(Core)
expect <Bool>, with state, events and result in scope.
PageContains
expect page(session("bo")) contains "milk".
PageMatchesSnapshot
expect page matches snapshot / … matches snapshot "after checkout".
The rendered page is compared to a checked-in file rather than to a string in the test, so
the assertion is the whole page rather than the part somebody remembered to name. name is
None when the test’s own name keys it — the common case, and the one that keeps the
assertion one line long.
FoldEquals
expect state == fold_of [ … ].
Place
expect place(charge) == server.
Flow
expect flow(ApiKey) reaches nothing on client.
WireCompatible
expect wire_compatible_with "orders.v1.becki".
Performed
expect no net.out / … once / … with Charge(amount=2000) — §21.3 rule 4.
Implementations§
Trait Implementations§
Source§impl Clone for Expectation
impl Clone for Expectation
Source§fn clone(&self) -> Expectation
fn clone(&self) -> Expectation
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for Expectation
impl RefUnwindSafe for Expectation
impl Send for Expectation
impl Sync for Expectation
impl Unpin for Expectation
impl UnwindSafe for Expectation
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