Код: Выделить всё
[TestMethod]
[ExpectedException(typeof(ArgumentNullException))]
public void Test_Exception()
{
throw new ArgumentNullException("test");
}
Подробнее здесь: https://stackoverflow.com/questions/116 ... -in-mstest
Код: Выделить всё
[TestMethod]
[ExpectedException(typeof(ArgumentNullException))]
public void Test_Exception()
{
throw new ArgumentNullException("test");
}