/// <summary> /// Looks up a test unit by fully qualified name /// </summary> /// <param name="root">The root test unit from which to start searching</param> /// <param name="fullyQualifiedName">The fully qualified name of the test unit to look for</param> /// <returns>The test unit with the requested fully qualified name or null if it cannot be found</returns> private TestUnit Lookup(TestUnit root, string fullyQualifiedName) { TestUnitLookup lookup = new TestUnitLookup(fullyQualifiedName); root.Apply(lookup); return(lookup.Unit); }
/// <summary> /// Locates the test unit with the specified fully qualified name from the provided root /// </summary> /// <param name="root">The root test unit from which to locate the test unit</param> /// <param name="fullyQualifiedName">The test unit's fully qualified name to locate</param> /// <returns>The located test unit or null if it was not found</returns> public static TestUnit Locate(TestUnit root, string fullyQualifiedName) { if (root == null) { return(null); } var locator = new BoostTestLocator(fullyQualifiedName); root.Apply(locator); return(locator.Unit); }