public async Task Should_complete_reservation_with_previous_token() { const string appName = "my-app"; var context = CreateRestoreContext(); A.CallTo(() => index.ReserveAsync(appId, appName)) .Returns("Reservation"); await sut.RestoreEventAsync(Envelope.Create(new AppCreated { Name = appName }), context); await sut.CompleteRestoreAsync(context); A.CallTo(() => index.AddAsync("Reservation")) .MustHaveHappened(); }
public async Task CompleteRestoreAsync(RestoreContext context) { await appsIndex.AddAsync(appReservation); await appsIndex.RebuildByContributorsAsync(context.AppId, contributors); }
public override async Task CompleteRestoreAsync(Guid appId, BackupReader reader) { await appsIndex.AddAsync(appReservation); await appsIndex.RebuildByContributorsAsync(appId, contributors); }