microsoft / microsoft/component-detection

Migrate away from Moq

Open
#709 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue status:ready type:tests
Dominant language
C#
Stars
553
Forks
135
Avg merge
20h 58m
Merged PRs (30d)
6

Description

Due to privacy concerns from https://github.com/moq/moq/issues/1372, we should migrate from Moq to a different mocking library.

We should probably migrate to NSubstitute, as this seems like the best candidate, but other mocking libraries like FakeItEasy also exist.

Moq is currently used extensively throughout our unit tests, and the use of this library should be replaced.

AB#2091272

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating all Moq references across the unit tests and review the proposed NSubstitute and FakeItEasy alternatives. Done means replacing the current Moq usage throughout the tests with an agreed mocking library and confirming the test suite still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.