Skip to content

moq/moq

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

moq v5

The most popular and friendly mocking framework for .NET

Version Status License Discord Chat GitHub

IMPORTANT: this repository is for the upcoming version of Moq. Issues and source for the current stable Moq v4.x are at https://github.com/moq/moq4

CI package feed: https://pkg.kzu.io/index.json

Building the repository

dotnet msbuild

Running tests:

dotnet test

Testing built packages locally

You can either build from command line or explicitly Pack (from the context menu) the Moq.Package project.

Packages are generated in the bin folder in the repository root. To test these packages you can just add a package source pointing to it. You can also just place a NuGet.Config like the following anywhere above the directory with the test solution(s):

<configuration>
	<packageSources>
		<add key="moq" value="[cloned repo dir]\bin" />
  </packageSources>
</configuration>

You can also do use project properties (or a Directory.Build.props to affect an entire folder hierarchy) with:

<Project>
  <PropertyGroup>
    <RestoreSources>https://api.nuget.org/v3/index.json;$(RestoreSources)</RestoreSources>
    <RestoreSources Condition="Exists('[cloned repo dir]\bin')">[cloned repo dir]\bin;$(RestoreSources)</RestoreSources>
  </PropertyGroup>
<Project>

Every time the packages are produced, the local nuget cache is cleared, so that a subsequent restore in VS will automatically cause the updated version to be unpacked again. The locally built version will always have the version 42.42.42.

Sponsors Sponsors

Special thanks to the following gold sponsors of this project:

Supported by Amazon Web Services Supported by Clarius

And to all our sponsors!

Kirill Osenkov C. Augusto Proiete SandRock Amazon Web Services Christian Findlay Clarius Org MFB Technologies, Inc.



get mentioned here too!