Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6901


Ignore:
Timestamp:
10/11/11 19:17:39 (13 years ago)
Author:
gkronber
Message:

#1653 small change to fix the unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/PluginLoader.cs

    r6866 r6901  
    4242        catch (BadImageFormatException) { }
    4343      }
    44       Assemblies = AppDomain.CurrentDomain.GetAssemblies().ToList();
     44      // test relevant path again to exclude previously loaded assemblies
     45      Assemblies = AppDomain.CurrentDomain.GetAssemblies()
     46        .Where(asm => IsRelevantAssemblyPath(asm.Location))
     47        .ToList();
    4548    }
    4649
    4750    private static bool IsRelevantAssemblyPath(string path) {
    4851      bool valid = true;
    49       valid = valid && (path.EndsWith(ExecutableExtension, StringComparison.OrdinalIgnoreCase) || path.EndsWith(AssemblyExtension, StringComparison.OrdinalIgnoreCase));
     52      valid = valid && path.EndsWith(ExecutableExtension, StringComparison.OrdinalIgnoreCase) || path.EndsWith(AssemblyExtension, StringComparison.OrdinalIgnoreCase);
    5053      valid = valid && !path.EndsWith(TestAccessorAssemblyExtension, StringComparison.OrdinalIgnoreCase) && !path.EndsWith(TestAssemblyExtension, StringComparison.OrdinalIgnoreCase);
    5154      return valid;
Note: See TracChangeset for help on using the changeset viewer.