Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/18/20 10:58:03 (4 years ago)
Author:
jkarder
Message:

#3089: explicitly fail on ReflectionTypeLoadException and BadImageFormatException

File:
1 edited

Legend:

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

    r17180 r17781  
    3939    [ClassInitialize]
    4040    public static void MyClassInitialize(TestContext testContext) {
    41       loadedPlugins = PluginLoader.Assemblies.Where(PluginLoader.IsPluginAssembly).ToDictionary(a => a, GetPluginFromAssembly);
     41      try {
     42        loadedPlugins = PluginLoader.Assemblies.Where(PluginLoader.IsPluginAssembly).ToDictionary(a => a, GetPluginFromAssembly);
     43      } catch (BadImageFormatException e) {
     44        var message = string.Join(Environment.NewLine, "Could not load all types. Check if test process architecture is set to x64.", string.Empty, "Exception:", e);
     45        Assert.Fail(message);
     46      }
     47
    4248      pluginNames = loadedPlugins.ToDictionary(a => a.Key.GetName().FullName, a => GetPluginName(a.Value));
    4349
Note: See TracChangeset for help on using the changeset viewer.