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); }
public void JsonSerialize_WithEmptyRootCauseElasticErrorResponse_SerializeCorrectly() { var errorResponse = new ElasticErrorResponse("test-type", "test-reason", "test-phase"); errorResponse.AssertJson(ExpectedEmptyCauseErrorResponse); }