public void DeleteMatchNoDataAccessTest() { Mock <IEncounterRepository> fakeRepo = new Mock <IEncounterRepository>(); fakeRepo.Setup(r => r.Delete(It.IsAny <int>())).Throws(new DataInaccessibleException()); serviceToTest = new EncounterService(fakeRepo.Object, teamsRepo, sportsRepo, usersRepo, auth.Object); serviceToTest.DeleteEncounter(3); }
private IActionResult TryToDelete(int id) { encounterService.DeleteEncounter(id); OkModelOut okMessage = new OkModelOut() { OkMessage = "The match was deleted successfully" }; return(Ok(okMessage)); }
public void DeleteUnexistentMatchTest() { serviceToTest.DeleteEncounter(3); }