Changeset 17165
- Timestamp:
- 07/23/19 21:01:03 (5 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
-
stable/HeuristicLab.Tests
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Tests merged: 17019
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Tests/HeuristicLab.Persistence.Attic/PersistenceConsistencyChecks.cs
r17105 r17165 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.