-
Notifications
You must be signed in to change notification settings - Fork 0
docs: Add XML documentation to remaining classes #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Build Commands | ||
|
|
||
| ### Primary Commands | ||
|
|
||
| - `dotnet run --project build/Build` - Main build command that restores, builds the solution | ||
| - `dotnet run --project build/Build -- --target=Test` - Run unit tests with coverage | ||
| - `dotnet run --project build/Build -- --target=Package` - Build and package for NuGet | ||
| - `dotnet run --project build/Publish -- --target=PublishNuGet` - Publish to NuGet (CI only) | ||
|
|
||
| ### Testing Commands | ||
|
|
||
| - `dotnet test src/Mimic.UnitTests/Mimic.UnitTests.csproj` - Run tests directly | ||
| - `dotnet test src/Mimic.UnitTests/Mimic.UnitTests.csproj --framework net8.0` - Test specific framework | ||
| - `dotnet test src/Mimic.UnitTests/Mimic.UnitTests.csproj --framework net9.0` - Test on .NET 9 | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ### Core Architecture | ||
|
|
||
| Mimic is a .NET mocking library built on Castle DynamicProxy with a fluent API design: | ||
|
|
||
| - **Main Library** (`src/Mimic/`): The core mocking functionality | ||
| - `Mimic<T>` - Main generic mimic class for creating mock objects | ||
| - `Setup/` - Fluent API for configuring method/property behaviours | ||
| - `Proxy/` - Castle DynamicProxy integration for runtime proxy generation | ||
| - `Expressions/` - Expression tree handling for type-safe setup syntax | ||
|
|
||
| - **Test Project** (`src/Mimic.UnitTests/`): Comprehensive unit tests | ||
| - Multi-target framework support (net8.0, net9.0) | ||
| - Uses xUnit, Shouldly, and AutoFixture | ||
| - Organised by feature area (Setup/, Expressions/, Core/, etc.) | ||
|
|
||
| ### Key Components | ||
|
|
||
| - **Mimic<T>**: Generic wrapper providing fluent API for mock configuration | ||
| - **Setup System**: Expression-based method/property setup with behaviours | ||
| - **Proxy Generation**: Runtime proxy creation using Castle DynamicProxy | ||
| - **Argument Matching**: Type-safe argument matchers (`Arg.Any<T>()`, etc.) | ||
| - **Verification**: Post-execution verification of method calls | ||
|
|
||
| ### Build System | ||
|
|
||
| Custom Cake-based build system in `build/` directory: | ||
|
|
||
| - **Build Project**: Main build tasks (Clean, Build, Test, Package) | ||
| - **Publish Project**: NuGet publishing tasks | ||
| - **Common**: Shared utilities and models | ||
| - Uses GitVersion for semantic versioning | ||
| - Coverlet for code coverage with Codecov integration | ||
|
|
||
| ## Development Guidelines | ||
|
|
||
| ### Testing Framework | ||
|
|
||
| - Primary: xUnit with Shouldly assertions | ||
| - Test data: AutoFixture for test data generation | ||
| - Coverage: Coverlet with 80%+ target coverage | ||
| - Multi-framework testing on net8.0 and net9.0 | ||
|
|
||
| ### Code Organisation | ||
|
|
||
| - Follow existing namespace patterns (Mimic.Core, Mimic.Setup, etc.) | ||
| - Use fluent interface patterns for public APIs | ||
| - Internal classes use Castle DynamicProxy conventions | ||
| - Expression trees for type-safe configuration | ||
|
|
||
| ### Package Management | ||
|
|
||
| - Central Package Management via Directory.Packages.props | ||
| - Package lock files are enabled for reproducible builds | ||
| - Castle.Core dependency for proxy generation | ||
| - JetBrains.Annotations for code contracts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.