- Timestamp:
- 06/18/19 16:59:14 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Tests/HeuristicLab.Persistence.Attic/PersistenceConsistencyChecks.cs
r16997 r17019 3 3 using System.Linq; 4 4 using HEAL.Attic; 5 using HeuristicLab.PluginInfrastructure;6 5 using Microsoft.VisualStudio.TestTools.UnitTesting; 7 6 … … 15 14 public void CheckDuplicateGUIDs() { 16 15 // easy to produce duplicate GUIDs with copy&paste 17 18 16 var dict = new Dictionary<Guid, string>(); 19 17 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())) { 21 20 var attr = StorableTypeAttribute.GetStorableTypeAttribute(type); 22 21 if (attr == null) … … 35 34 Console.WriteLine($"{kvp.Key} has same GUID as {kvp.Value}"); 36 35 } 36 37 37 if (duplicates.Any()) Assert.Fail("Duplicate GUIDs found."); 38 38 }
Note: See TracChangeset
for help on using the changeset viewer.