static void Main(string[] args) { decimal grossAmount = 4900; decimal costOfGrocery = 1000; int userEnum = 0; DateTime userCreatedDate = DateTime.Parse("05/09/2013"); Bill billObj1 = new Bill(grossAmount,costOfGrocery,userEnum,userCreatedDate); decimal netPayableAmount1 = billObj1.GetNetPayableAmount(); Console.WriteLine("Net Payable Amount: {0}", netPayableAmount1); }
public void GetNetPayableAmount_WithFutureUserCreatedDate_ShouldPass() { decimal grossAmount = 4900; int userEnum = 0; decimal costOfGrocery = 1000; DateTime userCreatedDate = DateTime.Parse("05/09/2016"); Bill billObj = new Bill(grossAmount, costOfGrocery, userEnum, userCreatedDate); decimal actual = billObj.GetNetPayableAmount(); decimal expected = -1; Assert.AreEqual(expected, actual); }
public void GetNetPayableAmountProperty_WithValidUserType_ShouldPass() { decimal grossAmount = 4900; decimal costOfGrocery = 1000; int userEnum = 0; DateTime userCreatedDate = DateTime.Parse("05/09/2013"); Bill billObj = new Bill(grossAmount, costOfGrocery, userEnum, userCreatedDate); decimal actual = billObj.GetNetPayableAmount(); decimal expected = 4460; Assert.AreEqual(expected, billObj.NetPayableAmount); }