[Repo Assist] test: extend RuntimeHelpers unit-test coverage#363
Merged
sergey-tihon merged 4 commits intomasterfrom Apr 10, 2026
Merged
Conversation
Add missing tests for RuntimeHelpers functions that were previously untested: - toQueryParams: missing Option<bool/int64/float32/double/DateTimeOffset> scalar and array variants (previously only Option<string/int32/Guid/ DateTime> were covered) - formatObject: new FormatObjectTests module covering string, int, null, array, and multi-property cases (sorts alphabetically) - toFormUrlEncodedContent: new ToFormUrlEncodedContentTests module covering encoding, null-exclusion, and empty sequence - toMultipartFormDataContent: new ToMultipartFormDataContentTests module covering string values, null skipping, and stream values Total test count increases from 252 to 286. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Extends unit test coverage for RuntimeHelpers (query param serialization, object formatting, and HTTP content helpers) by adding new cases for previously untested Option variants and helper functions.
Changes:
- Added
toQueryParamscoverage for additionalOption<_>scalar variants andOption<DateTimeOffset>[]. - Added new
FormatObjectTestscovering quoting/null/array formatting and alphabetical property ordering. - Added new tests for
toFormUrlEncodedContentandtoMultipartFormDataContentbehavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
/repo-assist fix the build, most likely formatting issue |
Contributor
Author
|
✗ Repo Assist encountered failed, see workflow run. |
Member
|
@copilot fix the build |
Agent-Logs-Url: https://github.com/fsprojects/SwaggerProvider/sessions/18e3dd9e-e3f5-4668-92bd-072362d8c4e0 Co-authored-by: sergey-tihon <1197905+sergey-tihon@users.noreply.github.com>
Contributor
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Extends unit-test coverage for
RuntimeHelpers— the runtime serialization and HTTP utilities used by every generated API client — by covering previously untested functions and missingtoQueryParamsOption variants.New test coverage
Missing
toQueryParamsscalar Option variants (previously onlyOption<string/int32/Guid/DateTime>had coverage):Option<bool>Some/NoneOption<int64>Some/NoneOption<float32>Some/NoneOption<double>Some/NoneOption<DateTimeOffset>Some/None + arrayFormatObjectTests(new module) —formatObjectwas entirely untested:null[elem; elem][]ToFormUrlEncodedContentTests(new module) —toFormUrlEncodedContentwas entirely untested:ToMultipartFormDataContentTests(new module) —toMultipartFormDataContentwas entirely untested:Test Status
Build: ✅ succeeded
Tests: ✅ 286 passed, 2 skipped (pre-existing), 0 failed
Format: ✅ Fantomas applied
Previous test count: 252 → New count: 286 (+34 tests)