Ejemplo n.º 1
0
 /// <summary>
 /// Configures a mock of the specified type to setup a call matching the specified expression to return a result of the specified type.
 /// </summary>
 /// <typeparam name="TService">The type of the service.</typeparam>
 /// <typeparam name="TResult">The type of the result.</typeparam>
 /// <param name="fixture">The fixture.</param>
 /// <param name="expression">The expression.</param>
 /// <param name="result">The result.</param>
 /// <param name="composer">The composer.</param>
 /// <param name="parameters">The parameters.</param>
 /// <returns></returns>
 public static ITestFixture HavingMockedCollection <TService, TResult>(
     this ITestFixture fixture,
     Expression <Func <TService, ICollection <TResult> > > expression,
     out ICollection <TResult> result,
     Action <Faker, TResult> composer = null,
     params Parameter[] parameters)
     where TService : class =>
 fixture.HavingModels(out result, composer)
 .HavingMocked(expression, result, parameters);