Пример #1
0
 public static IAssert <TSubject, TResult, TVars, TSequence> ItThrows <TSubject, TResult, TVars, TSequence> (
     this IAssert <TSubject, TResult, TVars, TSequence> assert,
     Type exceptionType,
     string message)
 {
     return(assert.ItThrows(exceptionType, x => message));
 }
Пример #2
0
 public static IAssert <TSubject, TResult, TVars, TSequence> ItThrowsContains <TSubject, TResult, TVars, TSequence> (
     this IAssert <TSubject, TResult, TVars, TSequence> assert,
     Type exceptionType,
     string message)
 {
     return(assert
            .ItThrows(exceptionType)
            .It("throws correct message", x => x.Exception.Message.Should().Contain(message)));
 }