Extend numeric integration tests to long, short, decimal, float, double#26
Merged
Extend numeric integration tests to long, short, decimal, float, double#26
Conversation
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
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>
3 tasks
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>
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.
Summary
(constraint × underlying type)combo beyondint—Positive,NonNegative,Negative,NonPositiveoverlong,short,decimal,float,double.SqlServerDbContextandPostgreSqlDbContextpick up the 20 newDbSet<>properties; the EF value converters and JSON converter factory already supported these underlying types (registered inStrongTypesModelConfigurationExtensions.UseStrongTypes), so no infrastructure changes were needed.decimaltest values stay within two fractional digits so they round-trip through EF Core's default SQL Serverdecimal(18,2)mapping;float/double/long/shorttests exerciseMinValue/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