コード例 #1
0
 public static TMocker WithError <TMocker, TError>(this ITypedResultMocker <TMocker> mock, TError error)
     where TMocker : ITypedResultMocker <TMocker>
 {
     return(mock.WithError(r => true, context => new MockResult <TError>(error, new MockHttpResponseMessage(HttpStatusCode.InternalServerError))));
 }
コード例 #2
0
 public static TMocker WithResult <TMocker, TResult>(this ITypedResultMocker <TMocker> mock, TResult result)
     where TMocker : ITypedResultMocker <TMocker>
 {
     return(mock.WithResult(r => true, context => new MockResult <TResult>(result)));
 }