BillForMonthlyCharge() 공개 메소드

public BillForMonthlyCharge ( System.DateTime today ) : Batch
today System.DateTime
리턴 Batch
예제 #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);
 }
예제 #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));
 }
예제 #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);
 }