public void SerializeError()
        {
            var response = new JsonResponse(false, new ErrorMessage("Something failed"));

            var actual = JsonConvert.SerializeObject(response);

            Assert.Equal(@"{""success"":false,""contentType"":""error"",""body"":{""message"":""Something failed""}}", actual);
        }
        public void SerializeModelError()
        {
            var errors = new List<KeyValuePair<string, ModelState>>();
            var state = new ModelState();
            state.Errors.Add("some error");
            errors.Add(new KeyValuePair<string, ModelState>("Something", state));
            var modelError = new ModelStateJson(errors);
            var response = new JsonResponse(false, modelError);

            var actual = JsonConvert.SerializeObject(response);

            Assert.Equal(@"{""success"":false,""contentType"":""model-errors"",""body"":{""Something"":[""some error""]}}", actual);
        }