Skip to content

[Repo Assist] test: extend RuntimeHelpers unit-test coverage#363

Merged
sergey-tihon merged 4 commits intomasterfrom
repo-assist/test-runtime-helpers-coverage-20260409-7becb51b9aedafa1
Apr 10, 2026
Merged

[Repo Assist] test: extend RuntimeHelpers unit-test coverage#363
sergey-tihon merged 4 commits intomasterfrom
repo-assist/test-runtime-helpers-coverage-20260409-7becb51b9aedafa1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 9, 2026

🤖 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 missing toQueryParams Option variants.

New test coverage

Missing toQueryParams scalar Option variants (previously only Option<string/int32/Guid/DateTime> had coverage):

  • Option<bool> Some/None
  • Option<int64> Some/None
  • Option<float32> Some/None
  • Option<double> Some/None
  • Option<DateTimeOffset> Some/None + array

FormatObjectTests (new module)formatObject was entirely untested:

  • String property formatted with quotes
  • Int property formatted without quotes
  • Null property formatted as null
  • Array property formatted as [elem; elem]
  • Empty array formatted as []
  • Multi-property object sorted alphabetically

ToFormUrlEncodedContentTests (new module)toFormUrlEncodedContent was entirely untested:

  • Key-value pairs encoded correctly
  • Null values excluded from output
  • Empty sequence produces empty body

ToMultipartFormDataContentTests (new module)toMultipartFormDataContent was entirely untested:

  • Null values skipped
  • String values added as single part
  • Stream values added with filename

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)

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@7ee2b60744abf71b985bead4599640f165edcd93

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>
@sergey-tihon sergey-tihon marked this pull request as ready for review April 10, 2026 04:25
Copilot AI review requested due to automatic review settings April 10, 2026 04:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 toQueryParams coverage for additional Option<_> scalar variants and Option<DateTimeOffset>[].
  • Added new FormatObjectTests covering quoting/null/array formatting and alphabetical property ordering.
  • Added new tests for toFormUrlEncodedContent and toMultipartFormDataContent behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sergey-tihon
Copy link
Copy Markdown
Member

/repo-assist fix the build, most likely formatting issue

@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions bot commented Apr 10, 2026

✗ Repo Assist encountered failed, see workflow run.

@sergey-tihon
Copy link
Copy Markdown
Member

@copilot fix the build

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

@copilot fix the build

Fixed in d746ea3. The build failure was a Fantomas formatting issue in RuntimeHelpersTests.fs — ran dotnet fantomas to apply the required formatting.

Copilot AI requested a review from sergey-tihon April 10, 2026 08:25
@sergey-tihon sergey-tihon merged commit 78c84e4 into master Apr 10, 2026
2 checks passed
@sergey-tihon sergey-tihon deleted the repo-assist/test-runtime-helpers-coverage-20260409-7becb51b9aedafa1 branch April 10, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants