public UpdateFeatureCommandHandler(
     ILogger <UpdateFeatureCommandHandler> logger,
     IFeaturesAggregate featuresAggregate,
     IPathsAggregate pathAggregate,
     ISystemClock clock)
 {
     this._logger            = logger;
     this._featuresAggregate = featuresAggregate;
     this._pathsAggregate    = pathAggregate;
     this._clock             = clock;
 }
 public static IHandleCommand <UpdateFeatureCommand> GivenCommandHandler(
     this UpdateFeatureCommandHandlerTests tests,
     IFeaturesAggregate featuresAggregate,
     IPathsAggregate pathsAggregate)
 {
     return(new UpdateFeatureCommandHandler(
                tests.GivenLogger <UpdateFeatureCommandHandler>(),
                featuresAggregate,
                pathsAggregate,
                tests.GivenClock()
                ));
 }
Ejemplo n.º 3
0
 public GetAllPathsQueryHandler(IPathsAggregate aggregate)
 {
     this._aggregate = aggregate;
 }
Ejemplo n.º 4
0
 public static GetAllPathsQueryHandler GivenHandler(
     this GetAllPathsQueryHandlerTests tests,
     IPathsAggregate aggregate)
 {
     return(new GetAllPathsQueryHandler(aggregate));
 }
Ejemplo n.º 5
0
 public static Func <Task> WhenPublishing(this IPathsAggregate aggregate, IEvent e)
 {
     return(() => aggregate.Publish(e));
 }
Ejemplo n.º 6
0
        public static async Task <IPathsAggregate> WithLoad(this IPathsAggregate aggregate)
        {
            await aggregate.Load();

            return(aggregate);
        }