"packages": [
{
"TriggerType": "sample",
"StatusDescription": "",
"Score": null,
"Percentile": null,
"Band": ""
}
]
When I parse this JSON using JObject attachmentData = JObject.Parse(targetPayload);
and perform the unit testing.
Assert.AreEqual("", attachmentData.SelectToken("packages")[0].SelectToken("Score").ToString());
This works fine but I want to check
Assert.AreEqual(null, attachmentData.SelectToken("packages")[0].SelectToken("Score").ToString());
or
Assert.IsNull(attachmentData.SelectToken("packages")[0].SelectToken("Score").ToString());
These are giving the following errors.
Assert.AreEqual failed. Expected:<(null)>. Actual:<>
{"Assert.IsNull failed. "}
Thanks!