Ejemplo n.º 1
0
        public async Task GetEmployeeById_AnnualSalary_correct_to_MonthlyContract()
        {
            int employeeId = 2;

            MonthlySalaryEmployeeDTO employee = new MonthlySalaryEmployeeDTO();

            employee.Id               = employeeId;
            employee.Name             = "Sebastian";
            employee.ContractTypeName = "MonthlySalaryEmployee";
            employee.RoleId           = 2;
            employee.RoleName         = "Contractor";
            employee.RoleDescription  = null;
            employee.HourlySalary     = 60000;
            employee.MonthlySalary    = 80000;

            var annualSalaryHourly = employee.MonthlySalary * 12;

            var employeeInfo = await _employeeBusinessLogic.GetEmployeeById(employeeId);

            Assert.IsNotNull(employeeInfo);
            Assert.AreEqual(annualSalaryHourly, employeeInfo.AnnualSalary);
        }
Ejemplo n.º 2
0
 public async Task <ViewModelEmployee> GetEmployeeById(int employeeId)
 {
     return(await _employeeBusinessLogic.GetEmployeeById(employeeId));
 }