private RuntimeTestResult MakeTestCaseFrom(MethodInfo method) { Action task = () => { try { method.Invoke(TestCase, new object[] { }); } catch (Exception error) { _parent.Completed(Active, error); } }; return(new RuntimeTestResult() { Error = null, Execute = task, Log = new List <string>(), Name = $"{TestCase.GetType().FullName}::{method.Name}", State = RuntimeTestState.Pending }); }
/// <summary> /// Runtime tests are async; you must explicitly terminate a test once you're done with it. /// </summary> protected void Completed() { _runner.Completed(Active); }