Example #1
0
        public async Task WhenRestore_ThenSuccess()
        {
            var headers = await _defaultRequestHeadersService.GetAsync();

            var source = await _create.CustomerSource.BuildAsync();

            var customerIds = (
                await Task.WhenAll(
                    _create.Customer
                    .WithSourceId(source.Id)
                    .BuildAsync(),
                    _create.Customer
                    .WithSourceId(source.Id)
                    .BuildAsync())
                )
                              .Select(x => x.Id)
                              .ToList();

            await _customersClient.RestoreAsync(customerIds, headers);

            var customers = await _customersClient.GetListAsync(customerIds, headers);

            Assert.All(customers, x => Assert.False(x.IsDeleted));
        }