diff --git a/XenAdminTests/UnitTests/XenObjectEqualsTests.cs b/XenAdminTests/UnitTests/XenObjectEqualsTests.cs index 1890cf9a1..39e1c5b88 100644 --- a/XenAdminTests/UnitTests/XenObjectEqualsTests.cs +++ b/XenAdminTests/UnitTests/XenObjectEqualsTests.cs @@ -47,7 +47,7 @@ namespace XenAdminTests.UnitTests private readonly Random _random = new Random(); /// - /// Gets all Types that derive from IXenObject except Folder. + /// Gets all Types that derive from IXenObject except Folder and DockerContainer /// public IEnumerable 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; } diff --git a/XenModel/DockerContainer.cs b/XenModel/DockerContainer.cs index 1a622aa9e..889d24fe3 100644 --- a/XenModel/DockerContainer.cs +++ b/XenModel/DockerContainer.cs @@ -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