public void TestEmpById() { var empName = "Abhijeet Trivedi"; var emp = _employee.GetEmpByIdAtBL(20008); Assert.AreEqual(empName, emp.EmployeeName); }
public IHttpActionResult GetEmployeeById(string employeeId) { var objEmp = new EmployeeViewModel(); int Id = Convert.ToInt32(employeeId); try { objEmp = _employee.GetEmpByIdAtBL(Id); if (objEmp == null) { return(NotFound()); } } catch (Exception) { throw; } return(Ok(objEmp)); }