mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CA-153178: Fix tests
This commit is contained in:
parent
0e03338a64
commit
1f4341147c
@ -47,7 +47,7 @@ namespace XenAdminTests.UnitTests
|
||||
private readonly Random _random = new Random();
|
||||
|
||||
/// <summary>
|
||||
/// Gets all Types that derive from IXenObject except Folder.
|
||||
/// Gets all Types that derive from IXenObject except Folder and DockerContainer
|
||||
/// </summary>
|
||||
public IEnumerable<Type> AllXenObjectTypesExceptFolder
|
||||
{
|
||||
@ -55,7 +55,7 @@ namespace XenAdminTests.UnitTests
|
||||
{
|
||||
foreach (Type t in typeof(IXenObject).Assembly.GetTypes())
|
||||
{
|
||||
if (!t.IsAbstract && typeof(IXenObject).IsAssignableFrom(t) && t.GetConstructor(new Type[0]) != null && !typeof(Folder).IsAssignableFrom(t))
|
||||
if (!t.IsAbstract && typeof(IXenObject).IsAssignableFrom(t) && t.GetConstructor(new Type[0]) != null && !typeof(Folder).IsAssignableFrom(t) && !typeof(DockerContainer).IsAssignableFrom(t))
|
||||
{
|
||||
yield return t;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ namespace XenAdmin.Model
|
||||
DockerContainer other = obj as DockerContainer;
|
||||
|
||||
return other != null &&
|
||||
name_label.Equals(other.name_label);
|
||||
uuid.Equals(other.uuid);
|
||||
}
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ namespace XenAdmin.Model
|
||||
if (other == null)
|
||||
return 1;
|
||||
|
||||
return StringUtility.NaturalCompare(_name_label, other._name_label);
|
||||
return StringUtility.NaturalCompare(_uuid, other.uuid);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user