Skip to content

Extend numeric integration tests to long, short, decimal, float, double#26

Merged
KaliCZ merged 2 commits intomainfrom
claude/sad-feynman-809b4d
Apr 17, 2026
Merged

Extend numeric integration tests to long, short, decimal, float, double#26
KaliCZ merged 2 commits intomainfrom
claude/sad-feynman-809b4d

Conversation

@KaliCZ
Copy link
Copy Markdown
Owner

@KaliCZ KaliCZ commented Apr 17, 2026

Summary

  • Adds entity, controller, and integration-test classes for every (constraint × underlying type) combo beyond intPositive, NonNegative, Negative, NonPositive over long, short, decimal, float, double.
  • Both SqlServerDbContext and PostgreSqlDbContext pick up the 20 new DbSet<> properties; the EF value converters and JSON converter factory already supported these underlying types (registered in StrongTypesModelConfigurationExtensions.UseStrongTypes), so no infrastructure changes were needed.
  • decimal test values stay within two fractional digits so they round-trip through EF Core's default SQL Server decimal(18,2) mapping; float/double/long/short tests exercise MinValue/MaxValue.

Integration test count goes from 101 to 501, all passing against both SQL Server and PostgreSQL.

Test plan

  • dotnet build src/StrongTypes.Api.IntegrationTests — succeeds with 0 warnings.
  • dotnet test src/StrongTypes.Api.IntegrationTests — 501/501 passing.

🤖 Generated with Claude Code

Adds entity/controller/test classes for every (constraint × underlying
type) combo beyond int, so the end-to-end ASP.NET Core + EF Core pipeline
is exercised for Positive/NonNegative/Negative/NonPositive across all
supported numeric underlying types. Test suite grows from 101 to 501
tests, all passing against both SQL Server and PostgreSQL.

Decimal test values stay within two fractional digits so they round-trip
through EF Core's default SQL Server decimal(18,2) mapping.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@KaliCZ KaliCZ self-assigned this Apr 17, 2026
@KaliCZ KaliCZ merged commit 01757ca into main Apr 17, 2026
2 checks passed
@KaliCZ KaliCZ deleted the claude/sad-feynman-809b4d branch April 17, 2026 10:33
KaliCZ added a commit that referenced this pull request Apr 17, 2026
The main csproj has an Analyzer ProjectReference to
StrongTypes.SourceGenerators. With --no-build, pack still needs to
resolve project references and invokes the Build target on the
generator project, which then fails with NETSDK1085 because NoBuild is
set. Letting pack perform a (no-op incremental) build sidesteps this.

The Pack step only runs on main pushes, so PR CI never exercised it —
both #25 and #26 merged green and broke main. A follow-up should make
this fail fast in PR CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
KaliCZ added a commit that referenced this pull request Apr 17, 2026
The main csproj has an Analyzer ProjectReference to
StrongTypes.SourceGenerators. With --no-build, pack still needs to
resolve project references and invokes the Build target on the
generator project, which then fails with NETSDK1085 because NoBuild is
set. Letting pack perform a (no-op incremental) build sidesteps this.

The Pack step only runs on main pushes, so PR CI never exercised it —
both #25 and #26 merged green and broke main. A follow-up should make
this fail fast in PR CI.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant