Exemplo n.º 1
0
        public void validateCalculatedAnnualSalaryForHourlyContracts()
        {
            //Arrange
            List <Employee> employees = new List <Employee>
            {
                employeeBuilder
                .Id(1)
                .ContractTypeName("HourlySalaryEmployee")
                .HourlySalary(60000)
                .Build(),
            };

            employeeRepository.FindAll()
            .Returns(employees);
            long expectedResult = 120 * 60000 * 12;
            int  employeeId     = 1;

            //Act
            var result = employeeService.Find(employeeId);

            //Assert
            Assert.AreEqual(expectedResult, result.AnnualSalary);
        }