Ignore:
Timestamp:
07/23/19 21:01:03 (4 months ago)
Author:
gkronber
Message:

#2520: merged r17019 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Tests

  • stable/HeuristicLab.Tests/HeuristicLab.Persistence.Attic/PersistenceConsistencyChecks.cs

    r17105 r17165  
    33using System.Linq;
    44using HEAL.Attic;
    5 using HeuristicLab.PluginInfrastructure;
    65using Microsoft.VisualStudio.TestTools.UnitTesting;
    76
     
    1514    public void CheckDuplicateGUIDs() {
    1615      // easy to produce duplicate GUIDs with copy&paste
    17 
    1816      var dict = new Dictionary<Guid, string>();
    1917      var duplicates = new Dictionary<string, string>();
    20       foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(object))) {
     18      // using AppDomain instead of ApplicationManager so that NonDiscoverableTypes are also checked
     19      foreach (Type type in AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes())) {
    2120        var attr = StorableTypeAttribute.GetStorableTypeAttribute(type);
    2221        if (attr == null)
     
    3534        Console.WriteLine($"{kvp.Key} has same GUID as {kvp.Value}");
    3635      }
     36
    3737      if (duplicates.Any()) Assert.Fail("Duplicate GUIDs found.");
    3838    }
Note: See TracChangeset for help on using the changeset viewer.