1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use self::bool_assertion::BoolAssertion;
use crate::assertions::string_assertion::StringAssertion;


pub mod bool_assertion;
pub mod string_assertion;
pub mod numeric_assertion;


pub trait ShouldString {
    type Assertion;
    fn should(self) -> Self::Assertion;
}

impl<T: AsRef<str>> ShouldString for T {
    type Assertion = StringAssertion<T>;

    fn should(self) -> StringAssertion<T>{
        StringAssertion::new(self)
    }
}


pub trait ShouldBool {
    type Assertion;
    fn should(self) -> Self::Assertion;
}

impl ShouldBool for bool {
    type Assertion = BoolAssertion;

    fn should(self) -> BoolAssertion {
        BoolAssertion::new(self)
    }
}