public void FailSomeWhere() { Console.WriteLine("started"); using (var thread = new StopAndGoThread()) { Console.WriteLine("thread.Run"); thread.Run(() => { throw new Exception("X"); }); } }
public void TestRunTwoThings() { Console.WriteLine("started"); using (var thread = new StopAndGoThread()) { Console.WriteLine("thread.Run"); bool ran = false; thread.Run(() => { ran = true; Console.WriteLine("running"); }); thread.Run(() => { ran = true; Console.WriteLine("running second time"); }); Assert.IsTrue(ran); Console.WriteLine("thread.Dispose()"); } Console.WriteLine("done"); }