public void TestSalesReceiptTransaction() { int empId = 5; AddCommissionedEmployee t = new AddCommissionedEmployee( empId, "Bill", "Home", 2000, 15.25, database); t.Execute(); SalesReceiptTransaction tct = new SalesReceiptTransaction( new DateTime(2005, 7, 31), 250.00, empId, database); tct.Execute(); Employee e = database.GetEmployee(empId); Assert.IsNotNull(e); PaymentClassification pc = e.Classification; Assert.IsTrue(pc is CommissionClassification); CommissionClassification cc = pc as CommissionClassification; SalesReceipt sr = cc.GetSalesReceipt(new DateTime(2005, 7, 31)); Assert.IsNotNull(sr); Assert.AreEqual(250.00, sr.SaleAmount, .001); }
public void AddSalesReceipt(SalesReceipt salesReceipt) { this.salesReceipts.Add(salesReceipt.Date, salesReceipt); }
public void AddSalesReceipt(SalesReceipt receipt) { salesReceipts[receipt.Date] = receipt; }
public void AddSalesReceipt(SalesReceipt sr) { salesReceipts[sr.Date] = sr; }