Beispiel #1
0
        public void JsonErrorResponse_SetThenGet_ShouldBeSame()
        {
            const int    code         = 1;
            const string message      = "message";
            const string target       = "target";
            var          requestValue = new { code };
            var          details      = new List <JsonError>();

            var error = new JsonError
            {
                Code         = code,
                Details      = details,
                Target       = target,
                Message      = message,
                RequestValue = requestValue
            };

            var response = new JsonErrorResponse();

            response.Error = error;

            Assert.Equal(error, response.Error);
        }
Beispiel #2
0
        public void JsonError_Default()
        {
            var response = new JsonError();

            Assert.Equal(default, response.Code);