public void TestManager_2_Subs() { STSysTechEmployeesData.AllEmployees.Clear(); STManager manager = new STManager() { ID = 1, ParentId = null }; manager.BaseRate = 17200; manager.DateStart = dateStartOld; manager.ParentId = null; STSysTechEmployeesData.AllEmployees.AddRange(new List <STSysTechEmployee>() { new STEmployee() { BaseRate = 4500, DateStart = dateStartNew, ParentId = 1 }, new STEmployee() { BaseRate = 4500, DateStart = dateStartNew, ParentId = 1 }, manager } ); double expected = 24127.7; Assert.AreEqual(expected, manager.GetRate(dateEnd), 0.001); }
public void TestManager_No_Subs() { STManager emp = new STManager(); emp.BaseRate = 17200; emp.DateStart = dateStartOld; emp.ParentId = null; double expected = 24080; Assert.AreEqual(expected, emp.GetRate(dateEnd), 0.001); }