public void DeleteEmployeeTest()
        {
            _mockRepository.Setup(x => x.Delete(empMaster)).Returns(true);
            var actual = _service.DeleteEmployee(empMaster);

            Assert.NotNull(actual);
            Assert.Equal(true, actual);
        }
Ejemplo n.º 2
0
        public IActionResult DeleteEmployee(Emp employee)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            _employeeService.DeleteEmployee(employee);

            return(Accepted());
        }