public void BillForMonthlyChargeMethod_CustomerIsFromOntario_ThrowsException() { var monthlyPackage = new MonthlyPackage { Id = 1235, Name = "Top Fit", Price = 9.20M }; var address = new Address("1234 Happy St", "Toronto", "Ontario"); var sut = new Customer { Id = 91352, MonthlyPackage = monthlyPackage, Address = address }; sut.BillForMonthlyCharge(DateTime.Today); }
public void BillForMonthlyChargeMethod_CustomerPackageInput_GeneratesBatchWithTransaction() { const decimal price = 12.20M; var monthlyPackage = new MonthlyPackage { Id = 1235, Name = "Top Fit", Price = price }; var sut = new Customer { Id = 91352, MonthlyPackage = monthlyPackage }; var batch = sut.BillForMonthlyCharge(DateTime.Today); Assert.IsTrue(batch.TransactionsContainsChargeOf(price)); }
public void BillForMonthlyChargeMethod_CustomerPackagePriceLessThanTenDollars_ThrowsException() { var monthlyPackage = new MonthlyPackage { Id = 1235, Name = "Top Fit", Price = 9.20M }; var sut = new Customer { Id = 91352, MonthlyPackage = monthlyPackage }; sut.BillForMonthlyCharge(DateTime.Today); }