On my endpoint's response I need to omit a property if its value is null , so I have tagged the prop with the [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
tag.
So, with the tag on the property, this property is not going to be part of the response payload and that's what I want to check/assert on my unit tests, that the property does not appear on my JSON response.
I'm using FluentAssertions as assertion framework and AutoFixture as mock generator.