Exemplo 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 HavingMockedComposedCollection <TService, TResult>(
     this ITestFixture fixture,
     Expression <Func <TService, ICollection <TResult> > > expression,
     out ICollection <TResult> result,
     Func <IPostprocessComposer <TResult>, IPostprocessComposer <TResult> > composer,
     params Parameter[] parameters)
     where TService : class =>
 fixture.HavingComposedModels(out result, composer)
 .HavingMocked(expression, result, parameters);