Exemplo n.º 1
0
        public void JsonSerialize_WithValidElasticErrorResponse_SerializeCorrectly()
        {
            var errorResponse = new ElasticErrorResponse("test-type", "test-reason", "test-phase");

            errorResponse.AddRootCause("test-root-type", "test-root-reason", "test-index");
            errorResponse.AssertJson(ExpectedValidErrorResponse);
        }
Exemplo n.º 2
0
        public void JsonSerialize_WithEmptyRootCauseElasticErrorResponse_SerializeCorrectly()
        {
            var errorResponse = new ElasticErrorResponse("test-type", "test-reason", "test-phase");

            errorResponse.AssertJson(ExpectedEmptyCauseErrorResponse);
        }