I'm doing a unit test on a simple controller checking that when a null ID is passed in that it returns a 400 code. However when I test this the result does not come back as being equal to a 400 error code.
My code:
int? nullID = null;
var edit = controller.Edit(nullID) as ActionResult;
var result = new HttpStatusCodeResult(400, null);
Assert.AreEqual(edit, result);
When I debug the test I get the expected result seen here:
Edit Result:
Expected Result:
Where am I going wrong on this?

