How to unit test a Web API controller using XUnit
问题 I am trying to unit test a method within my controller in my Web API using XUnit. The role of the method is to get a single title, by ISBN, from the database. The issue I came across during unit testing is that I am unsure how to insert the dummy data that I must perform the test on, as well as how the Assert function works. TitleController.cs [ApiController] [Route("titlecontroller")] public class TitleController : Controller { private IGtlTitleRepository _gtlTitleRepository; public