1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-20 04:42:57 +00:00

Small test fixes

This commit is contained in:
JKorf
2024-08-05 16:13:08 +02:00
parent 87b0c8d7a2
commit e3fece41f3
2 changed files with 12 additions and 1 deletions
@@ -151,7 +151,12 @@ namespace CryptoExchange.Net.Testing.Comparers
private static void CheckObject(string method, JProperty prop, object obj, List<string>? ignoreProperties)
{
var resultProperties = obj.GetType().GetProperties().Select(p => (p, ((JsonPropertyNameAttribute?)p.GetCustomAttributes(typeof(JsonPropertyNameAttribute), true).SingleOrDefault())?.Name));
var resultProperties = obj.GetType().GetProperties(
System.Reflection.BindingFlags.Public
| System.Reflection.BindingFlags.NonPublic
| System.Reflection.BindingFlags.GetProperty
| System.Reflection.BindingFlags.SetProperty
| System.Reflection.BindingFlags.Instance).Select(p => (p, ((JsonPropertyNameAttribute?)p.GetCustomAttributes(typeof(JsonPropertyNameAttribute), true).SingleOrDefault())?.Name));
// Property has a value
var property = resultProperties.SingleOrDefault(p => p.Name == prop.Name).p;