public async Task TestShouldSubmitPayoutBatch() { var date = DateTime.Now; var threeDaysFromNow = date.AddDays(3); var effectiveDate = threeDaysFromNow; var currency = Currency.USD; var instructions = new List <PayoutInstruction>() { new PayoutInstruction(100.0, "mtHDtQtkEkRRB5mgeWpLhALsSbga3iZV6u"), new PayoutInstruction(200.0, "mvR4Xj7MYT7GJcL93xAQbSZ2p4eHJV5F7A") }; var batch = new PayoutBatch(currency, effectiveDate, instructions); batch = await _bitpay.SubmitPayoutBatch(batch); Assert.IsNotNull(batch.Id, "Batch created with id=NULL"); Assert.IsTrue(batch.Instructions.Count == 2); }
public async Task TestShouldSubmitPayoutBatch() { var date = DateTime.Now; var threeDaysFromNow = date.AddDays(3); var effectiveDate = threeDaysFromNow; var reference = "My test batch"; var bankTransferId = "My bank transfer id"; var currency = "USD"; var instructions = new List <PayoutInstruction>() { new PayoutInstruction(100.0, "mtHDtQtkEkRRB5mgeWpLhALsSbga3iZV6u", "Alice"), new PayoutInstruction(200.0, "mvR4Xj7MYT7GJcL93xAQbSZ2p4eHJV5F7A", "Bob") }; var batch = new PayoutBatch(currency, effectiveDate, bankTransferId, reference, instructions); batch = await _bitpay.SubmitPayoutBatch(batch); Assert.NotNull(batch.Id); Assert.True(batch.Instructions.Count == 2); }