Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5306


Ignore:
Timestamp:
01/17/11 10:49:45 (14 years ago)
Author:
mkommend
Message:

Corrected HL3.3 tests project to test all assemblies and not only assemblies that contain a Plugin class (ticket #1351).

Location:
trunk/sources/HeuristicLab/3.3/Tests
Files:
5 edited

Legend:

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

    r5168 r5306  
    1313    [ClassInitialize]
    1414    public static void MyClassInitialize(TestContext testContext) {
    15       PluginLoader.pluginAssemblies.Any();
     15      PluginLoader.Assemblies.Any();
    1616    }
    1717
     
    2222      foreach (Type deepCloneableType in ApplicationManager.Manager.GetTypes(typeof(IDeepCloneable))) {
    2323        //test only types contained in HL plugin assemblies
    24         if (!PluginLoader.pluginAssemblies.Contains(deepCloneableType.Assembly)) continue;
     24        if (!PluginLoader.Assemblies.Contains(deepCloneableType.Assembly)) continue;
    2525
    2626        bool found = false;
  • trunk/sources/HeuristicLab/3.3/Tests/ContentViewTests.cs

    r4512 r5306  
    5252    [ClassInitialize]
    5353    public static void MyClassInitialize(TestContext testContext) {
    54       PluginLoader.pluginAssemblies.Any();
     54      PluginLoader.Assemblies.Any();
    5555    }
    5656
  • trunk/sources/HeuristicLab/3.3/Tests/PluginDependenciesTest.cs

    r4632 r5306  
    3838    [ClassInitialize]
    3939    public static void MyClassInitialize(TestContext testContext) {
    40       loadedPlugins = PluginLoader.pluginAssemblies.ToDictionary(a => a, GetPluginFromAssembly);
     40      loadedPlugins = PluginLoader.Assemblies.Where(x => PluginLoader.IsPluginAssembly(x)).ToDictionary(a => a, GetPluginFromAssembly);
    4141      pluginNames = loadedPlugins.ToDictionary(a => a.Key.GetName().FullName, a => GetPluginName(a.Value));
    4242
  • trunk/sources/HeuristicLab/3.3/Tests/PluginLoader.cs

    r5272 r5306  
    1212    public const string TestAccessorAssemblyExtension = "_Accessor.dll";
    1313    public const string TestAssemblyExtension = ".Tests.dll";
    14     public static List<Assembly> pluginAssemblies;
     14    public static List<Assembly> Assemblies;
    1515
    1616    static PluginLoader() {
     
    1919        Assembly.LoadFrom(path);
    2020
    21       pluginAssemblies = AppDomain.CurrentDomain.GetAssemblies().Where(IsPluginAssembly).ToList();
     21      Assemblies = AppDomain.CurrentDomain.GetAssemblies().ToList();
    2222    }
    2323
    24     private static bool IsPluginAssembly(Assembly assembly) {
     24    public static bool IsPluginAssembly(Assembly assembly) {
    2525      return assembly.GetExportedTypes()
    2626        .Where(t => typeof(IPlugin).IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface).Any();
  • trunk/sources/HeuristicLab/3.3/Tests/StorableConstructorTest.cs

    r5168 r5306  
    1616    [ClassInitialize]
    1717    public static void MyClassInitialize(TestContext testContext) {
    18       PluginLoader.pluginAssemblies.Any();
     18      PluginLoader.Assemblies.Any();
    1919    }
    2020
     
    2626        .Where(t => StorableClassAttribute.IsStorableClass(t))) {
    2727        //test only types contained in HL plugin assemblies
    28         if (!PluginLoader.pluginAssemblies.Contains(storableType.Assembly)) continue;
     28        if (!PluginLoader.Assemblies.Contains(storableType.Assembly)) continue;
    2929
    3030        IEnumerable<ConstructorInfo> ctors = storableType.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
Note: See TracChangeset for help on using the changeset viewer.