diff --git a/XmlSchemaClassGenerator.Tests/XmlTests.cs b/XmlSchemaClassGenerator.Tests/XmlTests.cs index 210c95f3..758dc75a 100644 --- a/XmlSchemaClassGenerator.Tests/XmlTests.cs +++ b/XmlSchemaClassGenerator.Tests/XmlTests.cs @@ -173,7 +173,7 @@ public void TestListWithPublicPropertySetters() Assert.NotNull(myClassType); var iListType = typeof(Collection<>); var collectionPropertyInfos = myClassType.GetProperties().Where(p => p.PropertyType.IsGenericType && iListType.IsAssignableFrom(p.PropertyType.GetGenericTypeDefinition())).OrderBy(p=>p.Name).ToList(); - var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPublic).ToList(); + var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPublic).OrderBy(p=>p.Name).ToList(); Assert.True(collectionPropertyInfos.Count > 0); Assert.Equal(collectionPropertyInfos, publicCollectionPropertyInfos); @@ -205,7 +205,7 @@ public void TestListWithPublicPropertySettersWithoutConstructors() Assert.NotNull(myClassType); var iListType = typeof(Collection<>); var collectionPropertyInfos = myClassType.GetProperties().Where(p => p.PropertyType.IsGenericType && iListType.IsAssignableFrom(p.PropertyType.GetGenericTypeDefinition())).OrderBy(p=>p.Name).ToList(); - var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPublic).ToList(); + var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPublic).OrderBy(p=>p.Name).ToList(); Assert.True(collectionPropertyInfos.Count > 0); Assert.Equal(collectionPropertyInfos, publicCollectionPropertyInfos); var myClassInstance = Activator.CreateInstance(myClassType);