https://github.com/hamedfathi/patchstatic
PatchStatic is a C# library that enables mocking of static methods and properties for unit testing purposes. It uses Harmony to patch static methods at runtime, providing thread-safe mocking with automatic cleanup through scoped mocking patterns.
https://github.com/hamedfathi/patchstatic
csharp csharp-library dotnet dotnet-core dotnetcore harmony mock moq nsubstitute nunit patch runtime static static-methods static-properties testing xunit
Last synced: 3 months ago
JSON representation
PatchStatic is a C# library that enables mocking of static methods and properties for unit testing purposes. It uses Harmony to patch static methods at runtime, providing thread-safe mocking with automatic cleanup through scoped mocking patterns.
- Host: GitHub
- URL: https://github.com/hamedfathi/patchstatic
- Owner: HamedFathi
- License: mit
- Created: 2025-06-08T23:21:30.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-09T00:31:16.000Z (4 months ago)
- Last Synced: 2025-06-09T01:27:07.743Z (4 months ago)
- Topics: csharp, csharp-library, dotnet, dotnet-core, dotnetcore, harmony, mock, moq, nsubstitute, nunit, patch, runtime, static, static-methods, static-properties, testing, xunit
- Language: C#
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE