[][src]Trait fluid::traits::collection::ShouldCollection

pub trait ShouldCollection<C: Debug> where
    C: Collection
{ fn contain<P>(self, right: P) -> ChainableAssert<ContainCollection<C, P>>
    where
        P: CollectionPattern<C>
;
fn be_empty(self) -> ChainableAssert<BeEmptyCollection<C>>; }

Adds the assertions to the collections.

Required methods

fn contain<P>(self, right: P) -> ChainableAssert<ContainCollection<C, P>> where
    P: CollectionPattern<C>, 

Checks that a collection contains a pattern:

Example

let v = vec![1, 2, 3];

v.should().contain(3).and_should().not().contain(0);

fn be_empty(self) -> ChainableAssert<BeEmptyCollection<C>>

Checks that a collection is empty:

Example

let v = vec![1, 2, 3];

v.should().not().be_empty();
Loading content...

Implementors

impl<C: Debug> ShouldCollection<C> for Should<C> where
    C: Collection
[src]

Loading content...