<t>Pour "Visual Studio Team Test", il semble que vous deviez appliquer l'attribut ExpectedException à la méthode de test.<br/>
<br/>
Exemple tiré de la documentation ici : A Unit Testing Walkthrough with Visual Studio Team Test<br/>
<br/>
[TestMethod]<br/>
[ExpectedException(typeof(ArgumentException),<br/>
"A userId of null was inappropriately allowed.")]<br/>
public void NullUserIdInConstructor()<br/>
{<br/>
LogonInfo logonInfo = new LogonInfo(null, "P@ss0word");<br/>
}<br/>
<br/>
```</t>