public static DotNetTestModule LoadTestModule(string filePath) { DotNetTestModule testModule = new DotNetTestModule(); Assembly assembly = Assembly.LoadFile(filePath); Type[] types = assembly.GetTypes(); foreach (Type t in types) { DotNetClassInfo dci = new DotNetClassInfo(t); testModule.classInfos.Add(dci); } testModule.fullPath = filePath; return(testModule); }
public static ITestModule LoadTestModule(string filePath) { if (!File.Exists(filePath)) { return(null); } ITestModule testModule = null; try { testModule = DotNetTestModule.LoadTestModule(filePath); return(testModule); } catch (Exception) { return(null); } }