public void SetUp() { Fixture.Inject <ITransientFaultHandler <IOptimisticConcurrencyRetryStrategy> >( new TransientFaultHandler <IOptimisticConcurrencyRetryStrategy>( Fixture.Create <ILog>(), new OptimisticConcurrencyRetryStrategy(new EventFlowConfiguration()))); _resolverMock = InjectMock <IResolver>(); _eventStoreMock = InjectMock <IEventStore>(); _thingyAggregate = new ThingyAggregate(ThingyId.New); _eventStoreMock .Setup(s => s.LoadAggregateAsync <ThingyAggregate, ThingyId>(It.IsAny <ThingyId>(), It.IsAny <CancellationToken>())) .Returns(() => Task.FromResult(_thingyAggregate)); }
private static Task NoOperationAsync(ThingyAggregate thingyAggregate, CancellationToken cancellationToken) { return(Task.FromResult(0)); }