public async void DeleteAsync_ShouldReturnNoContent() { // Arrange var id = 123; var employeeServiceMock = new Mock <IEmployeesService>(); var controller = new EmployeeController(employeeServiceMock.Object); // Act var result = await controller.DeleteAsync(id); // Arrange employeeServiceMock.Verify(x => x.DeleteEmployeeAsync(id), Times.Once); Assert.IsAssignableFrom <NoContentResult>(result); }