mercredi 14 juin 2017

How to catch any kind of exception in unit test cases in C#? [ExpectedException(typeof(----------------))]

I am new to C# and to unit test cases as well. I need to catch any kind of exception that arrives with the flow of the program. I am not sure what kind of Exception will occur or may not occur? Can I be vague and just catch Exception instead of being specific with the Exception?

[ExpectedException(typeof(----------------))]

Aucun commentaire:

Enregistrer un commentaire