When I execute long tests using the DynamicTestFactory, sometimes
ThreadAbortException is thrown when the tests are canceled very early. Am I
correct in understanding the sample code below should not throw that
exception?
[TestFixture]
public class TestFixture1
{
private List<string> testObject { get; set; }
[FixtureSetUp]
public void TestSetup()
{
testObject = new List<string>();
testObject.Add("hello");
testObject.Add("bye");
testObject.Add("fooo");
testObject.Add("test");
}
[DynamicTestFactory, Factory("testObject"), Parallelizable,
ExpectedException(typeof(ThreadAbortException))]
public IEnumerable<Test> TestTest(string arg)
{
yield return new TestCase("SomeTest", () =>
{
try
{
Thread.Sleep(5000);
Assert.AreEqual("test", arg);
}
catch (ThreadAbortException ex)
{
Assert.Inconclusive();
}
});
}
}
--
You received this message because you are subscribed to the Google Groups
"MbUnit.User" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/mbunituser/-/7XExjTbd43oJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/mbunituser?hl=en.