BillForMonthlyCharge() public method

public BillForMonthlyCharge ( System.DateTime today ) : Batch
today System.DateTime
return Batch
Example #1
0
 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);
 }
Example #2
0
 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));
 }
Example #3
0
 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);
 }