Home > front end >  running server with a specific unit test in c#
running server with a specific unit test in c#

Time:10-19

I want to unit test the client, which, requires that the server be running Is there some way to specify in the unit test project that the server project should be started before running a particular unit test?

CodePudding user response:

If you want to make an integration test, you could use a TestServer.

Here are some resources

  • ms docs
  • this blog post has a decent explanation as well

CodePudding user response:

It depends on the server implementation, but you should be able to start a server instance at the beginning of the test or Mock the server to test your class.

Publish the class to test for a better and more accurate answer

  • Related