Skip to content

Re-land BindingContext.PropertyType regression test on master - #10

Merged
guy-lud merged 1 commit into
masterfrom
test/bindingcontext-propertytype-reland
Jul 12, 2026
Merged

Re-land BindingContext.PropertyType regression test on master#10
guy-lud merged 1 commit into
masterfrom
test/bindingcontext-propertytype-reland

Conversation

@guy-lud

@guy-lud guy-lud commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-lands the BindingContext.PropertyType regression test onto master.

The test was approved in #9, but #9 was stacked on the #8 branch and merged there; since #8 was squash-merged to master separately, the test never reached master. This cherry-picks it over. The B4 fix it guards is already on master (via #8), so the suite is green.

Test — Tests/.../SimpleSettings/BindingContextTests.cs

  • ..._IsThePropertysOwnType — a custom ISectionBinder captures the per-property BindingContext; asserts PropertyType is the property's type (string/int), not the declaring interface.
  • ..._StillExposesDeclaringInterface — the declaring type stays reachable via SettingsType and PropertyInfo.DeclaringType.

dotnet test from src/92 green (net8.0 + net10.0).

Guards the B4 fix (PR #8): BindingContext.PropertyType must expose each
property's own type, not its declaring interface. Verified fail-first — with
PropertyType = propertyInfo.DeclaringType the assertion reports the property
type as the settings interface (ICaptureSettings) instead of System.String.

A second test documents that the fix did not remove access to the declaring
type: it stays reachable via SettingsType and PropertyInfo.DeclaringType.
@guy-lud
guy-lud merged commit dd6a6ed into master Jul 12, 2026
1 check passed
guy-lud added a commit that referenced this pull request Jul 12, 2026
Docs only; no code changes.

- FIX-PLAN.md (new): the prioritized, per-item fix plan from the three-part
  code review (architecture, tests, performance), with a progress banner.
- SESSION-HANDOFF.md: replace the stale modernization-era handoff with a
  current one covering the review, the fixes shipped this cycle
  (PRs #8/#10/#11/#12), key decisions (Validations and EqualityCompererCreator
  held for upcoming feature work), ranked next steps, and gotchas. The push/PR
  recipe is kept in private notes rather than inlined.
@guy-lud
guy-lud deleted the test/bindingcontext-propertytype-reland branch July 12, 2026 16:44
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