public void WhenAddingValidatingResultsWithNoMemberAndDefaultKey_ThenControllerShouldHaveModelErrors() { var controller = new ControllerTest(); ControllerExtensions.AddModelErrors(controller, new List <ValidationResult> { new ValidationResult("msg") }, "test"); Assert.True(controller.ModelState["test"].Errors.Count == 1); Assert.True(controller.ModelState["test"].Errors[0].ErrorMessage == "msg"); }