public void BadRequestObjectResult_ModelState_SetsStatusCodeAndValue() { // Arrange & Act var badRequestObjecResult = new BadRequestObjectResult(new ModelStateDictionary()); // Assert Assert.Equal(StatusCodes.Status400BadRequest, badRequestObjecResult.StatusCode); var errors = Assert.IsType<SerializableError>(badRequestObjecResult.Value); Assert.Equal(0, errors.Count); }
public void BadRequestObjectResult_SetsStatusCodeAndValue() { // Arrange & Act var obj = new object(); var badRequestObjecResult = new BadRequestObjectResult(obj); // Assert Assert.Equal(StatusCodes.Status400BadRequest, badRequestObjecResult.StatusCode); Assert.Equal(obj, badRequestObjecResult.Value); }