public void PutDiff_DataFieldsNotValid_StatusBadRequest() { // Arange var model = new DiffPutModel() { Data = null }; // Act var resultLeft = _ctrl.PutDiff(1, "left", model).Result.ExecuteAsync(CancellationToken.None); var resultRight = _ctrl.PutDiff(1, "right", model).Result.ExecuteAsync(CancellationToken.None); // Assert var statusCodeLeft = resultLeft.Result.StatusCode; var statusCodeRight = resultRight.Result.StatusCode; Assert.IsTrue(statusCodeLeft == HttpStatusCode.BadRequest); Assert.IsTrue(statusCodeRight == HttpStatusCode.BadRequest); }