コード例 #1
0
 public void TestBillAfterFixedThisWeek()
 {
     bill = new Bill {
         Id = 1, CompanyId = 1, Date = new DateTime(2018, 12, 10), Amount = 100, Number = 1.ToString()
     };
     billingType = new BillAfterFixed(1, false);
     Assert.AreEqual(new DateTime(2018, 12, 10), billingType.GetFirstDate(bill.Date));
     Assert.AreEqual(new DateTime(2018, 12, 11), billingType.GetLastDate(bill.Date));
     billingType = new BillAfterFixed(4, false);
     Assert.AreEqual(new DateTime(2018, 12, 14), billingType.GetLastDate(bill.Date));
     billingType = new BillAfterFixed(4, true);
     Assert.AreEqual(new DateTime(2018, 12, 14), billingType.GetLastDate(bill.Date));
 }
コード例 #2
0
 public void TestBillBefore()
 {
     billingType = new BillBefore();
     Assert.AreEqual(bill.Date, billingType.GetFirstDate(bill.Date));
     Assert.AreEqual(bill.Date, billingType.GetLastDate(bill.Date));
 }