Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add unit test coverage for TypeFullNameComparer and SharedTypeExtensions - #38695

#38695
Merged
AndriySvyryd merged 1 commit into
dotnet:maindotnet/efcore:mainfrom
ilkertskn:test/shared-type-helpers-coverageilkertskn/efcore:test/shared-type-helpers-coverageCopy head branch name to clipboard
Jul 29, 2026
Merged

Add unit test coverage for TypeFullNameComparer and SharedTypeExtensions#38695
AndriySvyryd merged 1 commit into
dotnet:maindotnet/efcore:mainfrom
ilkertskn:test/shared-type-helpers-coverageilkertskn/efcore:test/shared-type-helpers-coverageCopy head branch name to clipboard

Conversation

@ilkertskn

@ilkertskn ilkertskn commented Jul 26, 2026

Copy link
Copy Markdown
Contributor
  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format:
        Summary of the changes
        - Detail 1
        - Detail 2

        Fixes #bugnumber
  • Tests for the changes have been added (for bug fixes / features)
  • Code follows the same patterns and style as existing code in this repo

@ilkertskn
ilkertskn requested a review from a team as a code owner July 26, 2026 01:43
@ilkertskn

ilkertskn commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Add unit test coverage for TypeFullNameComparer and SharedTypeExtensions

  • Add TypeFullNameComparerTest covering Compare/Equals/GetHashCode and null handling
  • Add SharedTypeExtensionsTest covering previously-untested type helpers: UnwrapNullableType,
    MakeNullable, IsNumeric, IsSignedInteger, UnwrapEnumType, IsScalarType, IsInstantiable,
    IsValidEntityType, IsCompatibleWith, GetTypesInHierarchy, GetBaseTypesAndInterfacesInclusive
  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format
  • Tests for the changes have been added (this PR is test-only: adds missing coverage)
  • Code follows the same patterns and style as existing code in this repo

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 focused unit tests for two shared/core utility components used throughout EF Core: TypeFullNameComparer (type ordering/equality) and SharedTypeExtensions (various System.Type helpers). This improves confidence in these low-level helpers without changing production behavior.

Changes:

  • Added unit tests validating TypeFullNameComparer ordering, null-handling, equality, and singleton instance behavior.
  • Added unit tests covering key SharedTypeExtensions behaviors (nullable/enum handling, numeric/scalar checks, compatibility, and type hierarchy helpers).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/EFCore.Tests/Internal/TypeFullNameComparerTest.cs New unit tests for TypeFullNameComparer compare/equality/hash behavior and edge cases (null/reference/culture-vs-ordinal).
test/EFCore.Tests/Extensions/SharedTypeExtensionsTest.cs New unit tests for SharedTypeExtensions Type helper methods (nullability, numeric/scalar, compatibility, hierarchy).

@AndriySvyryd AndriySvyryd modified the milestone: 12.0.0 Jul 27, 2026
@ilkertskn

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@AndriySvyryd AndriySvyryd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution!

@AndriySvyryd
AndriySvyryd merged commit a0344ff into dotnet:main Jul 29, 2026
22 checks passed
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.