public void GetPackageDirectory() { // Test only makes sense if run as part of the NUnit solution string solutionDir = _baseDir.Parent.Parent.FullName; Assume.That(File.Exists(Path.Combine(solutionDir, "nunit.sln"))); string expected = Path.Combine(solutionDir, "packages"); Assert.That(DirectoryFinder.GetPackageDirectory(_baseDir).FullName, Is.EqualTo(expected)); }
/// <summary> /// Find candidate extension assemblies starting from a /// given base directory. /// </summary> /// <param name="startDir"></param> private void FindExtensionAssemblies(DirectoryInfo startDir) { // First check the directory itself ProcessAddinsFiles(startDir, false); // Use any packages directory we find as well var packageDir = DirectoryFinder.GetPackageDirectory(startDir); if (packageDir != null) { foreach (var dir in DirectoryFinder.GetDirectories(packageDir, "NUnit.Extension.*/**/tools/")) { ProcessDirectory(dir, false); } } }