/// <summary> /// Configures a mock of the specified type to setup a call matching the /// specified expression to throw an exception of the specified type. /// </summary> /// <typeparam name="TService">The type of the service.</typeparam> /// <typeparam name="TException">The type of the exception.</typeparam> /// <param name="fixture">The fixture.</param> /// <param name="expression">The expression.</param> /// <param name="composer">The composer.</param> /// <param name="parameters">The parameters.</param> /// <returns></returns> public static ITestFixture HavingMockThrow <TService, TException>( this ITestFixture fixture, Expression <Action <TService> > expression, Func <IPostprocessComposer <TException>, IPostprocessComposer <TException> > composer = null, params Parameter[] parameters) where TService : class where TException : Exception => fixture.HavingMockThrow(expression, out _, composer, parameters);