Пример #1
0
        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);
        }
Пример #2
0
        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);
        }