public static DependencyCollection CreateQueryProcessor <TQuery, TResult>(this DependencyCollection dependencies, Func <TQuery, TResult> processor) where TQuery : IQuery <TResult> { var instance = new ActionQueryProcessor <TQuery, TResult>(processor); return(dependencies.AddInstance <IQueryProcessor <TQuery, TResult> >(instance)); }
public ActionQueryProcessorShould() { _action = new Mock <Func <Query, Boo> >(); _query = Fixture.Create <Query>(); _processor = new ActionQueryProcessor <Query, Boo>(_action.Object); }