public async Task GetEmployeeByIdEmptyInformation() { Employee employeeOne = new EmployeeTestDataBuilder().WithId(1).WithContractTypeName("HourlySalaryEmployee").Builder(); Employee employeeTwo = new EmployeeTestDataBuilder().WithId(2).WithContractTypeName("MonthlySalaryEmployee").Builder(); _Employee.GetEmployees().Returns(new List <Employee> { employeeOne, employeeTwo }); await _EmployeeService.GetEmployeeByIdAsync(3).ConfigureAwait(false); }
public async Task GetEmployeeByIdAnnualSalaryContractMonthly() { Employee employeeOne = new EmployeeTestDataBuilder().WithId(1).WithContractTypeName("HourlySalaryEmployee").Builder(); Employee employeeTwo = new EmployeeTestDataBuilder().WithId(2).WithContractTypeName("MonthlySalaryEmployee").Builder(); _Employee.GetEmployees().Returns(new List <Employee> { employeeOne, employeeTwo }); Employee employee = await _EmployeeService.GetEmployeeByIdAsync(2).ConfigureAwait(false); Assert.AreEqual(960000, employee.AnnualSalary); }