Пример #1
0
        private async Task <(Guid Otc, string Password)> Collect(Pocket p, params VoucherCreatePayload.VoucherInfo[] vi)
        {
            int beforeCount  = p.VoucherCount;
            int requestCount = (from v in vi select v.Count).Sum();

            (var otcGen, var pwd) = await _instrument.RequestVouchers(vi);

            await p.CollectVouchers(otcGen, pwd);

            Assert.AreEqual(beforeCount + requestCount, p.VoucherCount);

            return(otcGen, pwd);
        }