Changeset 5151 for trunk/sources/HeuristicLab/3.3/Tests
- Timestamp:
- 12/21/10 16:39:56 (14 years ago)
- Location:
- trunk/sources/HeuristicLab/3.3/Tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab/3.3/Tests/CloningConstructorTest.cs
r4722 r5151 21 21 22 22 foreach (Type deepCloneableType in ApplicationManager.Manager.GetTypes(typeof(IDeepCloneable))) { 23 //test only types contained in HL plugin assemblies 24 if (!PluginLoader.pluginAssemblies.Contains(deepCloneableType.Assembly)) break; 25 23 26 bool found = false; 24 27 foreach (ConstructorInfo constructor in deepCloneableType.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)) { -
trunk/sources/HeuristicLab/3.3/Tests/PluginLoader.cs
r4512 r5151 10 10 internal static class PluginLoader { 11 11 public const string AssemblyExtension = ".dll"; 12 public const string TestAccessorAssemblyExtension = "_Accessor.dll"; 13 public const string TestAssemblyExtension = ".test.dll"; 12 14 public static List<Assembly> pluginAssemblies; 13 15 14 16 static PluginLoader() { 15 17 foreach (string path in Directory.EnumerateFiles(Environment.CurrentDirectory) 16 .Where(s => s.EndsWith(AssemblyExtension) ))18 .Where(s => s.EndsWith(AssemblyExtension) && !s.EndsWith(TestAccessorAssemblyExtension) && !s.EndsWith(TestAssemblyExtension))) 17 19 Assembly.LoadFrom(path); 18 20 -
trunk/sources/HeuristicLab/3.3/Tests/StorableConstructorTest.cs
r4722 r5151 25 25 foreach (Type storableType in ApplicationManager.Manager.GetTypes(typeof(object)) 26 26 .Where(t => StorableClassAttribute.IsStorableClass(t))) { 27 //test only types contained in HL plugin assemblies 28 if (!PluginLoader.pluginAssemblies.Contains(storableType.Assembly)) break; 29 27 30 IEnumerable<ConstructorInfo> ctors = storableType.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); 28 31 ConstructorInfo storableConstructor = ctors.Where(c => c.GetParameters().Count() == 1 && c.GetParameters().First().ParameterType == typeof(bool)).FirstOrDefault();
Note: See TracChangeset
for help on using the changeset viewer.