/// <summary>
 /// Scans the assembly for a class with the TestAssemblyFixtureAttribute
 /// set. Takes the first one it finds. If the assembly doesn't contain
 /// such a class a default will be created (null object).
 /// </summary>
 /// <param name="assembly">Assembly to scan.</param>
 /// <returns>TestAssemblyFixtureInfo object.</returns>
 internal static TestAssemblyFixtureInfo Scan(IAssembly assembly) {
    foreach(Type t in assembly.GetExportedTypes()) {
       if(   ! t.IsAbstract
          && IsTestAssemblyFixture(t) ) {
          return new CustomAssemblyFixture(t);
       }
    }
    return new NullFixture();
 }
示例#2
0
 /// <summary>
 /// Scans the assembly for a class with the TestAssemblyFixtureAttribute
 /// set. Takes the first one it finds. If the assembly doesn't contain
 /// such a class a default will be created (null object).
 /// </summary>
 /// <param name="assembly">Assembly to scan.</param>
 /// <returns>TestAssemblyFixtureInfo object.</returns>
 internal static TestAssemblyFixtureInfo Scan(IAssembly assembly)
 {
     foreach (Type t in assembly.GetExportedTypes())
     {
         if (!t.IsAbstract &&
             IsTestAssemblyFixture(t))
         {
             return(new CustomAssemblyFixture(t));
         }
     }
     return(new NullFixture());
 }