public void CreateJsonOptionsTest() { var options = JsonOptions.Create(); options.PropertyNamingPolicy.Should().Be(JsonNamingPolicy.CamelCase); options.WriteIndented.Should().BeTrue(); options.Converters.Should().ContainEquivalentOf(new JsonStringEnumConverter()); }
private string GetResponseJson(string message, object errors = null) { var response = new ErrorResponse(message, errors); return(JsonConvert.SerializeObject(response, JsonOptions.Create())); }