Skip to content

Comments

test: fix PackageUpdateServiceTests override signature#715

Merged
dsarno merged 1 commit intoCoplayDev:betafrom
dsarno:fix/package-update-service-tests-signature
Feb 10, 2026
Merged

test: fix PackageUpdateServiceTests override signature#715
dsarno merged 1 commit intoCoplayDev:betafrom
dsarno:fix/package-update-service-tests-signature

Conversation

@dsarno
Copy link
Collaborator

@dsarno dsarno commented Feb 10, 2026

Summary

  • update TestablePackageUpdateService override to match PackageUpdateService method signature
  • fix compile error in Unity tests: CS0115 on FetchLatestVersionFromGitHub

Why

PackageUpdateService.FetchLatestVersionFromGitHub now takes a branch parameter, but the test subclass still overrode the old no-arg method.

Change

  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/PackageUpdateServiceTests.cs
    • FetchLatestVersionFromGitHub() -> FetchLatestVersionFromGitHub(string branch)

Summary by Sourcery

Tests:

  • Update the TestablePackageUpdateService override of FetchLatestVersionFromGitHub to accept a branch parameter matching the production service API.

Summary by CodeRabbit

  • Tests
    • Updated test infrastructure to support branch parameter handling.

Note: This is an internal testing change with no user-facing impact.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 10, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the Unity test subclass TestablePackageUpdateService to match the updated PackageUpdateService.FetchLatestVersionFromGitHub method signature by adding the required branch parameter, fixing a compiler override error in tests.

File-Level Changes

Change Details Files
Align test override method signature with the updated production method to fix CS0115 compile error.
  • Change the protected override FetchLatestVersionFromGitHub method to accept a string branch parameter.
  • Preserve existing test behavior by keeping the method body the same: set GitFetchCalled and return GitFetchResult.
TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/PackageUpdateServiceTests.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

A test utility class method signature was updated to accept a branch parameter, aligning the test override with changes made to the base service class's FetchLatestVersionFromGitHub method.

Changes

Cohort / File(s) Summary
Test Method Signature Update
TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/PackageUpdateServiceTests.cs
Updated TestablePackageUpdateService.FetchLatestVersionFromGitHub() method signature to accept a string branch parameter, matching the base class interface change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 A branch parameter hops into place,
The test class quickens its pace,
Signatures now in harmony dance,
Where mock and reality both advance! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In the test double override of FetchLatestVersionFromGitHub(string branch), consider either asserting on the expected branch value or renaming the parameter to '_' to make it explicit that the argument is intentionally unused in this context.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the test double override of FetchLatestVersionFromGitHub(string branch), consider either asserting on the expected branch value or renaming the parameter to '_' to make it explicit that the argument is intentionally unused in this context.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dsarno dsarno merged commit b8f7726 into CoplayDev:beta Feb 10, 2026
1 of 2 checks passed
@dsarno dsarno deleted the fix/package-update-service-tests-signature branch February 13, 2026 04:28
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