2022-06-28 18:17:14 +02:00
|
|
|
|
using Bit.Core.Models.Business;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
2022-08-29 21:53:48 +02:00
|
|
|
|
namespace Bit.Core.Test.Models.Business
|
2022-06-28 18:17:14 +02:00
|
|
|
|
{
|
2022-08-29 21:53:48 +02:00
|
|
|
|
public class BillingInfoTests
|
2022-06-28 18:17:14 +02:00
|
|
|
|
{
|
2022-08-29 21:53:48 +02:00
|
|
|
|
[Fact]
|
|
|
|
|
public void BillingInvoice_Amount_ShouldComeFrom_InvoiceTotal()
|
2022-06-28 18:17:14 +02:00
|
|
|
|
{
|
2022-08-29 21:53:48 +02:00
|
|
|
|
var invoice = new Stripe.Invoice
|
|
|
|
|
{
|
|
|
|
|
AmountDue = 1000,
|
|
|
|
|
Total = 2000,
|
|
|
|
|
};
|
2022-06-28 18:17:14 +02:00
|
|
|
|
|
2022-08-29 21:53:48 +02:00
|
|
|
|
var billingInvoice = new BillingInfo.BillingInvoice(invoice);
|
2022-06-28 18:17:14 +02:00
|
|
|
|
|
2022-08-29 21:53:48 +02:00
|
|
|
|
// Should have been set from Total
|
|
|
|
|
Assert.Equal(20M, billingInvoice.Amount);
|
|
|
|
|
}
|
2022-06-28 18:17:14 +02:00
|
|
|
|
}
|
|
|
|
|
}
|