public void DeleteExample_ShouldReturn_NumberOfEntitiesDeleted() { var result = service.Delete(1); Assert.Multiple(() => { repository.Verify(r => r.Delete(It.IsAny <long>()), Times.Once); Assert.NotZero(result); }); }
public async Task <IActionResult> Delete(long id) { var service = new ExampleService(connString); var result = await service.Delete(id); return(httpResult.Message(result.Code, result)); }