protected static IEnumerable<ITest> GetParents(ITest test) { while (test != null) { yield return test; test = test.Parent; } }