I have a project in C# and Framework 6. I have a WEB API to call the methods. what is the best way to write a unit test for async WebAPI methods?
This is the method I have:
[HttpGet]
[Route("GetYears")]
public async Task<IEnumerable<Year>> GetYears()
{
IEnumerable<Year> newYears;
newYears = await creditApplicationsRepository.GetYearsAsync();
return newYears;
}
Aucun commentaire:
Enregistrer un commentaire