Skip to content

Doing complex assertions in tests with `DDAssert*`

Maciek Grzybowski edited this page Jan 24, 2023 · 1 revision

In #1137 we introduced a bunch of DDAssert* methods for asserting complex types in tests:

  • DDAssertReflect + DDAssertNotReflect -- compare values with reflection
  • DDAssertJSONEqual + DDAssertJSONNotEqual -- compare JSON encoded strings for both values
  • DDAssertDictionariesEqual + DDAssertDictionariesNotEqual -- compare anonymous dictionaries

These should be used everywhere where Equatable is not enough or is not available.