I am trying to test callback functionality of DotNet Core application. I have exposed controller that I would like to call within integration test.
I have set up integration test using xUnit following https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-3.1 Within the test I am able to prepare client using WebApplicationFactory. It is possible to call required controller using this client.
But my concern is how to call the controller from outside. In other words, is it exposed on some localhost port? I was not able to find such. It is not listening on 5000 (port defined in my appsettings). Nor it is listening on port 80 (default port).
I would like to have something like spring boot @LocalServerPort and use it within test. Is there such possibility?
Aucun commentaire:
Enregistrer un commentaire