Пример #1
0
 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;
 }
Пример #2
0
 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);
 }
Пример #3
0
        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);
        }