public void DeleteAsync_ThrowsValidationException() { Mock.Setup(repo => repo.GetAsync(It.IsAny <int>())) .Returns(GetExceptionTest()); Assert.ThrowsAsync <ValidationException>(async() => await ProfessorService.DeleteAsync(null)); Assert.ThrowsAsync <ValidationException>(async() => await ProfessorService .DeleteAsync(It.IsAny <int>())); }
public async Task DeleteAsync_ValidCall() { await ProfessorService.DeleteAsync(It.IsAny <int>()); Mock.Verify(m => m.Delete(It.IsAny <Professor>())); }