Here is Timeout exception checking on the main code. Although the Timeout Exception occurs, Console shows abc.
However, In the Unit Test, when this Program meet a test case that has TimeoutException, It stop. How can I fix it? please.
try
{
Stopwatch sw = new Stopwatch();
if (sw.ElapsedMilliseconds > 3) throw new TimeoutException();
}
catch (TimeoutException)
{
Console.WriteLine("Time Over!");
}
return abc;
[Test()]
public void TestCase()
{
...
}