|
1 | | -using System; |
| 1 | +using System; |
2 | 2 | using System.CodeDom; |
3 | 3 | using System.Collections.Generic; |
4 | 4 | using System.Collections.ObjectModel; |
@@ -157,7 +157,7 @@ public void TestListWithPrivatePropertySetters() |
157 | 157 | var iListType = typeof(Collection<>); |
158 | 158 | var collectionPropertyInfos = myClassType.GetProperties().Where(p => p.PropertyType.IsGenericType && iListType.IsAssignableFrom(p.PropertyType.GetGenericTypeDefinition())).OrderBy(p=>p.Name).ToList(); |
159 | 159 | var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPrivate).OrderBy(p=>p.Name).ToList(); |
160 | | - Assert.True(collectionPropertyInfos.Count > 0); |
| 160 | + Assert.NotEmpty(collectionPropertyInfos); |
161 | 161 | Assert.Equal(collectionPropertyInfos, publicCollectionPropertyInfos); |
162 | 162 |
|
163 | 163 | var myClassInstance = Activator.CreateInstance(myClassType); |
@@ -189,7 +189,7 @@ public void TestListWithPublicPropertySetters() |
189 | 189 | var iListType = typeof(Collection<>); |
190 | 190 | var collectionPropertyInfos = myClassType.GetProperties().Where(p => p.PropertyType.IsGenericType && iListType.IsAssignableFrom(p.PropertyType.GetGenericTypeDefinition())).OrderBy(p=>p.Name).ToList(); |
191 | 191 | var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPublic).OrderBy(p=>p.Name).ToList(); |
192 | | - Assert.True(collectionPropertyInfos.Count > 0); |
| 192 | + Assert.NotEmpty(collectionPropertyInfos); |
193 | 193 | Assert.Equal(collectionPropertyInfos, publicCollectionPropertyInfos); |
194 | 194 |
|
195 | 195 | var myClassInstance = Activator.CreateInstance(myClassType); |
@@ -221,7 +221,7 @@ public void TestListWithPublicPropertySettersWithoutConstructors() |
221 | 221 | var iListType = typeof(Collection<>); |
222 | 222 | var collectionPropertyInfos = myClassType.GetProperties().Where(p => p.PropertyType.IsGenericType && iListType.IsAssignableFrom(p.PropertyType.GetGenericTypeDefinition())).OrderBy(p=>p.Name).ToList(); |
223 | 223 | var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPublic).OrderBy(p=>p.Name).ToList(); |
224 | | - Assert.True(collectionPropertyInfos.Count > 0); |
| 224 | + Assert.NotEmpty(collectionPropertyInfos); |
225 | 225 | Assert.Equal(collectionPropertyInfos, publicCollectionPropertyInfos); |
226 | 226 | var myClassInstance = Activator.CreateInstance(myClassType); |
227 | 227 | foreach (var collectionPropertyInfo in publicCollectionPropertyInfos) |
@@ -253,7 +253,7 @@ public void TestListWithPublicPropertySettersWithoutConstructorsSpecified() |
253 | 253 | var iListType = typeof(Collection<>); |
254 | 254 | var collectionPropertyInfos = myClassType.GetProperties().Where(p => p.PropertyType.IsGenericType && iListType.IsAssignableFrom(p.PropertyType.GetGenericTypeDefinition())).OrderBy(p => p.Name).ToList(); |
255 | 255 | var publicCollectionPropertyInfos = collectionPropertyInfos.Where(p => p.SetMethod.IsPublic).OrderBy(p => p.Name).ToList(); |
256 | | - Assert.True(collectionPropertyInfos.Count > 0); |
| 256 | + Assert.NotEmpty(collectionPropertyInfos); |
257 | 257 | Assert.Equal(collectionPropertyInfos, publicCollectionPropertyInfos); |
258 | 258 | var myClassInstance = Activator.CreateInstance(myClassType); |
259 | 259 |
|
|
0 commit comments