Skip to content

Conversation

@paulirwin
Copy link
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
Copy link
Contributor

Copilot AI left a comment

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 GetProfile 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 GetProfile visibility from protected internal to public in ShingleBased.cs
  • Added GetProfile_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 GetProfile method public and removed unused import
test/F23.StringSimilarity.Tests/CosineTest.cs Added GetProfile_IsPublic test, removed unused imports/fields, modernized using statements, fixed primary constructor syntax
test/F23.StringSimilarity.Tests/JaccardTest.cs Added GetProfile_IsPublic test
test/F23.StringSimilarity.Tests/QGramTest.cs Added GetProfile_IsPublic test
test/F23.StringSimilarity.Tests/SorensenDiceTest.cs Added GetProfile_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.

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>
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.

ShingleBased.GetProfile is not public

2 participants