public static IMore <T> Color <T>( this IHave <T> have, Colors color ) where T : Animal { have.Compose(animal => { Expect(animal.Colors).To.Contain.Exactly(1).Equal.To(color); }); return(have.More()); }
public static void Data( this IHave <string> have, byte[] data) { have.Compose(actual => { Expect(actual).To.Exist(); var contents = File.ReadAllBytes(actual); Expect(contents) .To.Equal(data, "Data mismatch"); }); }