Exemple #1
0
        private void UpdateSalaries(int year)
        {
            int    dayEntreprise = 0;
            int    count         = 0;
            double bosssalary    = subOf.GetYearSalary(year);

            foreach (Mission m in missions[year])
            {
                if (m.Client == entreprise)
                {
                    TimeSpan ts = m.EndDate - m.StartDate;
                    dayEntreprise += ts.Days;
                }
                else
                {
                    count++;
                }
            }

            double salaire = baseSalary - 10 * dayEntreprise + bosssalary / 100 + 250 * count;

            salaries.Add(year, salaire);
        }
Exemple #2
0
 public void TestGetManagerYearSalary()
 {
     Assert.AreEqual(60500, m.GetYearSalary(2017));
     Assert.AreEqual(60000, m.GetYearSalary(2016));
 }