/// <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 HavingMockedAsync <TService, TResult>( this ITestFixture fixture, Expression <Func <TService, Task <TResult> > > expression, out TResult result, Action <Faker, TResult> composer = null, params Parameter[] parameters) where TService : class => fixture.HavingModel(out result, composer) .HavingMockedAsync(expression, result, parameters);