Thanks for taking the time to contribute. This project is a C# NuGet library collection that bridges AutoFixture with multiple mocking libraries and exposes xUnit2 attributes to reduce test boilerplate.
- .NET 8 SDK (minimum)
- .NET Framework 4.7.2 and 4.8 (Windows only, required for full
net472/net48test coverage)
git clone https://github.com/Accenture/AutoFixture.XUnit2.AutoMock.git
cd AutoFixture.XUnit2.AutoMock
# Restore all repository-local .NET tools (Husky.NET, CommitLint.Net, and dotnet-stryker)
dotnet tool restore
# Activate local Git hooks managed by Husky.NET
dotnet husky installAll build, test, and pack commands are in the Build / Test / Pack section below.
dotnet build src/Objectivity.AutoFixture.XUnit2.AutoMock.slnThe build runs all analyzers with TreatWarningsAsErrors=true - any warning is a build failure.
Run all framework slices:
dotnet test src/Objectivity.AutoFixture.XUnit2.AutoMock.slnOr run a single slice:
dotnet test src/Objectivity.AutoFixture.XUnit2.AutoMock.sln --framework net8.0NuGet packages are produced from the solution:
dotnet pack src/Objectivity.AutoFixture.XUnit2.AutoMock.sln --configuration ReleaseMutation testing is executed via Stryker.NET. The dotnet-stryker tool is installed in Getting Started, so you can run it from the src/ directory (the config is resolved relative to src/):
cd src
dotnet dotnet-stryker -f ../stryker-config.ymlCode style is enforced by .editorconfig and a suite of analyzers (StyleCop, Roslynator, SonarAnalyzer, xunit.analyzers). A clean build - zero warnings - means all rules are satisfied. You do not need to run a separate linter step.
Use Conventional Commits:
- Format:
type(scope): description - Examples:
feat(core): add new attributefix(tests): correct GIVEN/WHEN/THEN namingchore(ci): update build instructionsdocs: clarify local development setup
Commit messages are validated by a local commit-msg hook (Husky.NET + CommitLint.Net), so invalid messages are rejected before the commit is created.
The required local tools and hook activation are configured in Getting Started (dotnet tool restore + dotnet husky install).
Non-trivial changes (new attributes, refactors, CI changes) require a plan and explicit approval before implementation. Work items are tracked in .backlog folder using Backlog.md - check it before starting to avoid duplicate effort.
Direct pushes to master are not allowed. All changes must be introduced via a feature branch and a pull request.
- Create a branch and implement your change.
- For non-trivial changes, create a work item in
.backlog(see Work Tracking). - Open a PR against
master. - Ensure your PR description and checklist are completed (see
.github/pull_request_template.md). - Before requesting review, verify:
dotnet build src/Objectivity.AutoFixture.XUnit2.AutoMock.slnpasses with no warningsdotnet test src/Objectivity.AutoFixture.XUnit2.AutoMock.slnpasses on all framework slices- (If applicable) coverage and mutation testing expectations remain acceptable
If you are using an AI coding assistant, follow the repository guidance in:
AGENTS.md(project context, architecture, conventions, and working rules)CLAUDE.md(assistant-specific instructions, including “propose before acting” for non-trivial changes)