public static async Task <TestCaseModel> Create(TestSession session, TestCase test) { var model = new TestCaseModel(session, test); await model.initTcs.Task.ConfigureAwait(false); return(model); }
async void ResolveTestCase() { var serialized = Result.Path.SerializePath(); var result = await Session.ResolveFromPath(serialized, CancellationToken.None); WillChangeValue("TestCase"); testCase = new TestCaseModel(Session, result); DidChangeValue("TestCase"); }
async void OnSessionChanged(TestSession session) { if (session != null) { var test = session.RootTestCase; if (test != null) { var model = await TestCaseModel.Create(session, test); TestResultController.AddObject(model); } } else { var array = (NSArray)TestResultController.Content; var length = (int)array.Count; for (int i = 0; i < length; i++) { var index = NSIndexPath.FromIndex(0); TestResultController.RemoveObjectAtArrangedObjectIndexPath(index); } } }