I have set of xUnit tests that have to make requests to running Kestrel server. There is a code that runs the only once before tests in the beginning and has to run Kestrel server on the specific port.
I know about Microsoft.AspNetCore.TestHost
package. It has TestServer
class that lets to create client to make requests to the server. But my unit tests are testing classes that encapsulate HttpClients inside already.
So, I need just to run server on specific port in the beginning. How can I to do that?
Aucun commentaire:
Enregistrer un commentaire