Skip to content

Make ShingleBased public and add unit tests, #21 - #55

Merged
paulirwin merged 3 commits into
mainfrom
issue/21
Dec 1, 2025
Merged

Make ShingleBased public and add unit tests, #21#55
paulirwin merged 3 commits into
mainfrom
issue/21

Conversation

@paulirwin

Copy link
Copy Markdown
Member

This was a regression of #21, which now adds unit tests to ensure it doesn't regress in the future.

Fixes #21

Copilot AI review requested due to automatic review settings December 1, 2025 23:09

Copilot AI left a comment

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.

Pull request overview

This PR makes the Get个人资料 method in the ShingleBased base class public (changing from protected internal) and adds unit tests across all four derived classes (Cosine, Jaccard, QGram, SorensenDice) to ensure the method remains publicly accessible. The change addresses issue #21 and prevents future regressions. Additional refactoring in CosineTest.cs modernizes the code by removing unused dependencies and updating using statements to C# 8+ patterns.

Key Changes:

  • Changed Get个人资料 visibility from protected internal to public in ShingleBased.cs
  • Added Get个人资料_IsPublic test method to four test classes to verify public API accessibility
  • Modernized CosineTest.cs with updated using statement patterns and removed unused test infrastructure

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/F23.StringSimilarity/ShingleBased.cs Made Get个人资料 method public and removed unused import
test/F23.StringSimilarity.Tests/CosineTest.cs Added Get个人资料_IsPublic test, removed unused imports/fields, modernized using statements, fixed primary constructor syntax
test/F23.StringSimilarity.Tests/JaccardTest.cs Added Get个人资料_IsPublic test
test/F23.StringSimilarity.Tests/QGramTest.cs Added Get个人资料_IsPublic test
test/F23.StringSimilarity.Tests/SorensenDiceTest.cs Added Get个人资料_IsPublic test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment thread test/F23.StringSimilarity.Tests/CosineTest.cs Outdated
Comment thread test/F23.StringSimilarity.Tests/JaccardTest.cs Outdated
Comment thread test/F23.StringSimilarity.Tests/QGramTest.cs Outdated
Comment thread test/F23.StringSimilarity.Tests/SorensenDiceTest.cs Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@paulirwin
paulirwin enabled auto-merge (squash) December 1, 2025 23:13
@paulirwin
paulirwin merged commit bb304e5 into main Dec 1, 2025
3 checks passed
@paulirwin
paulirwin deleted the issue/21 branch December 1, 2025 23:22
paulirwin added a commit that referenced this pull request Dec 1, 2025
This was a regression of #21, which now adds unit tests to ensure it
doesn't regress in the future.

Fixes #21

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

项目

None yet

Development

Successfully merging this pull request may close these issues.

ShingleBased.Get个人资料 is not public

2 participants