vendredi 25 septembre 2015

How to unit test / integration test console application in solution?

I have a console app (which will later be installed as a Windows Service) that basically runs an infinite loop that reads messages from a queue and does something with that message.

I'd like to create an automated test case to launch test end-to-end behavior. My question is, what's the best way to launch the application in a unit test? do I use Process.Start? or can I reference the Program.cs - static void main directly and run that?

ideas? sample code would be greatly appreciated, thanks!

Aucun commentaire:

Enregistrer un commentaire