public async Task Valid_Employee_Delete() { //Act var result = (int)await objController.DeleteRegistration(1); ////Assert _employeeMock.Verify(m => m.Remove(1), Times.Once); Assert.AreEqual(1, result); }
public async void Delete_registration_Test() { var registrationId = 2; _IRegistrationRepoMock.Setup(x => x.Delete(registrationId)) .ReturnsAsync(true); var response = await _registrationController.DeleteRegistration(registrationId); Assert.IsType <OkResult>(response); }