예제 #1
0
 public static IMore <string> Foo(this IA <string> a)
 {
     return(a.Compose(
                actual =>
     {
         Expect(actual).To.Contain("foo");
     }));
 }
예제 #2
0
 internal static void Benny(this IA <Person> a)
 {
     a.Compose(person =>
     {
         Expect(person).Not.To.Be.Null("Null person");
         Expect(person.Gender).To.Equal(Genders.Male);
         Expect(person.Name).To.Equal("Benny");
     }, (person, passed) =>
               $"Expected {person.Stringify()} {passed.AsNot()}to be a Benny");
 }
 internal static IMore <Person> Female(
     this IA <Person> a
     )
 {
     a.Compose(person =>
     {
         Expect(person.Gender).To.Equal(Genders.Female);
     });
     return(a.More());
 }
 internal static IMore <Person> Sally(
     this IA <Person> a
     )
 {
     a.Compose(person =>
     {
         Expect(person.Name).To.Equal("Sally");
     });
     return(a.More());
 }