You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investing #10944 I found that StaticDocuments test was passing despite having the same problem that complex fields like Location were not being serialized and thus coming back null. While Assert.AreEqual works for SearchDocument, it does not for static models like Hotel.
For testing, we could probably implement IEqualityComparer<Hotel> et. al. to pass use, like:
Never mind. The existing equals override was explicitly excluding Location while we wait for a resolution to #10592, but Microsoft.Spatial.GeographyPoint will suffice for now.
While investing #10944 I found that
StaticDocuments
test was passing despite having the same problem that complex fields likeLocation
were not being serialized and thus coming back null. WhileAssert.AreEqual
works forSearchDocument
, it does not for static models likeHotel
.For testing, we could probably implement
IEqualityComparer<Hotel>
et. al. to pass use, like:Or, since it's only test data, just override
Equals
onHotel
et. al.This works for dynamic documents because NUnit uses a chained comparer for common types like dictionaries, so works on nested
SearchDocument
s.The text was updated successfully, but these errors were encountered: