Skip to content

[Repo Assist] test: add integration tests for DUCasesGenerator output#278

Merged
7sharp9 merged 1 commit into
masterfrom
repo-assist/improve-ducases-tests-9ee96f8b11021980
Apr 16, 2026
Merged

[Repo Assist] test: add integration tests for DUCasesGenerator output#278
7sharp9 merged 1 commit into
masterfrom
repo-assist/improve-ducases-tests-9ee96f8b11021980

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Adds 19 integration tests covering the output of DUCasesGenerator — a generator that previously had zero direct tests in the suite.

Root Cause

The DUCasesGenerator is one of three core generators (alongside FieldsGenerator and LensesGenerator), yet the test suite had no assertions verifying its output. The generated TestDus.Currency module (containing toString, fromString, toTag, and five predicate functions) was compiled and linked into every test run but never exercised.

This matters now because PR #268 (getCaseIdent helper) and PR #277 (generateModulesWithAttr migration) both modify DUCasesGenerator. Tests that directly exercise the generator's output give reviewers and CI confidence that these refactoring PRs do not change observable behaviour.

Changes

File Change
test/Myriad.IntegrationPluginTests/Tests.fs +68 lines: new testList "DU Cases" inside "basic tests"

The new test list covers the existing TestDus.Currency module (generated from Input.Currency via the [(Generator.DuCases "dus")] attribute):

  • toString — all 5 cases: CAD, PLN, EUR, USD, Custom _
  • fromString — parsing each known string; None for unknown input
  • toTag — integer ordinals 0–4 for all cases
  • predicatesisCAD (true/false), isCustom (true/false)

No production code is changed.

Test Status

  • Build: ✅ 0 warnings, 0 errors (dotnet build test/Myriad.IntegrationPluginTests -c Release)
  • Tests: ✅ 52/52 passed — 33 pre-existing + 19 new (dotnet run --project test/Myriad.IntegrationPluginTests -c Release -- --summary)

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@ee49512da7887942965ac0a0e48357106313c9dd. View source at https://github.com/githubnext/agentics/tree/ee49512da7887942965ac0a0e48357106313c9dd/workflows/repo-assist.md.

Tests cover the generated Currency module in TestDus namespace:
- toString: all 5 cases (CAD, PLN, EUR, USD, Custom _)
- fromString: parsing known/unknown strings
- toTag: integer ordinals for all cases
- predicates: isCAD, isCustom (true/false cases)

33 existing tests still pass; 19 new tests added (52 total).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@7sharp9 7sharp9 marked this pull request as ready for review April 16, 2026 12:37
Copilot AI review requested due to automatic review settings April 16, 2026 12:37
@7sharp9 7sharp9 merged commit 191864a into master Apr 16, 2026
@7sharp9 7sharp9 deleted the repo-assist/improve-ducases-tests-9ee96f8b11021980 branch April 16, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds integration-level assertions for the generated TestDus.Currency module to ensure DUCasesGenerator output (string conversion, parsing, tags, and predicates) is exercised by the test suite, improving confidence for recent/ongoing generator refactors.

Changes:

  • Add a new testList "DU Cases" under the existing "basic tests" suite.
  • Assert behavior of generated toString, fromString, toTag, and selected predicate functions for the Currency DU.

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

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.

2 participants