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();
        }
示例#2
0
        public async Task CompleteRestoreAsync(RestoreContext context)
        {
            await appsIndex.AddAsync(appReservation);

            await appsIndex.RebuildByContributorsAsync(context.AppId, contributors);
        }
示例#3
0
        public override async Task CompleteRestoreAsync(Guid appId, BackupReader reader)
        {
            await appsIndex.AddAsync(appReservation);

            await appsIndex.RebuildByContributorsAsync(appId, contributors);
        }