Skip to content

test: ensure Compile skips open generic mapping rules (#925)#965

Open
leno23 wants to merge 1 commit into
MapsterMapper:developmentfrom
leno23:test/compile-open-generic-mapping-925
Open

test: ensure Compile skips open generic mapping rules (#925)#965
leno23 wants to merge 1 commit into
MapsterMapper:developmentfrom
leno23:test/compile-open-generic-mapping-925

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 25, 2026

Summary

  • Add regression coverage for configuring ClassA<>ClassB<> and calling Compile() without throwing
  • Verifies closed generic mappings still work after validation

Addresses #925

Test plan

  • CI passes (WhenMappingWithOpenGenerics.Compile_With_Open_Generic_Mapping_Does_Not_Throw)

)

Add regression coverage for configuring ClassA<> to ClassB<> and calling
Compile() without throwing, matching the documented validation behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
.NewConfig(typeof(A<>), typeof(B<>))
.Map("BProperty", "AProperty");

config.Compile(); // is not throw exception
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@leno23 If you added a separate test, then delete it. And everything will be fine. 👍

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.

2 participants