Example #1
0
        public void CalculateCorrectSalary(byte experience, decimal expected)
        {
            var salaryStrategy = new SalaryStrategyForProgrammer();

            var result = salaryStrategy.CalculateSalary(experience);

            Assert.AreEqual(result, expected);
        }
Example #2
0
        public void WhenExperienceIsZeroThrowsException()
        {
            var salaryStrategy = new SalaryStrategyForProgrammer();

            Assert.Catch <NotSupportedException>(() => salaryStrategy.CalculateSalary(0));
        }