public static FrameworkAdapter CreateInstanceFor(AssemblyLoader assemblyLoader) { if (_adapter != null) { return(_adapter); } if (_adapter == null) { _adapter = MsUnitTestAdapter.Try(assemblyLoader); } if (_adapter == null) { _adapter = CsUnitAdapter.Try(assemblyLoader); } if (_adapter == null) { _adapter = NUnitAdapter.Try(assemblyLoader); } return(_adapter); }
public static FrameworkAdapter CreateInstance(string assemblyName) { if (_adapter != null) { return(_adapter); } // TODO: Replace following by virtual constructor pattern. [01mar09, ml] if (_adapter == null) { _adapter = MsUnitTestAdapter.Create(assemblyName); } if (_adapter == null) { _adapter = NUnitAdapter.Create(assemblyName); } if (_adapter == null) { // All others were not found. Create default. [01mar09, ml] _adapter = new CsUnitAdapter(); } return(_adapter); }