/** * Recursively collect classes from the supplied directory * * @param arg the directory to search in * @param out output * @param ptrn the pattern (regexp) to filter found files */ private static void collectTests(File root, File arg, List<String> out, String ptrn) { if (arg.isDirectory()) { for (File f : arg.listFiles()) { collectTests(root, f, out, ptrn); } } else { String path = arg.GetAbsolutePath(); String prefix = root.GetAbsolutePath(); String cls = path.Substring(prefix.Length + 1).Replace(File.separator, "."); if(cls.matches(ptrn)) out.Add(cls); } }