프로젝트
GitHub에서 보기
JasonBock/Rocks
소개
A mocking library based on the Compiler APIs (Roslyn + Mocks)
프로그래밍 언어 및 런타임측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalRocks

A mocking library based on the Compiler APIs (Roslyn + Mocks).
Getting Started
Reference the Rocks NuGet package - that's it.
Prerequisites
The Rocks package targets .NET Standard 2.0 for host flexibility. That said, Rocks (as of 10.0.0) will generate code that requires .NET 10.
Usage
To make a mock, you take an interface or an unsealed class that has virtual members:
public interface IAmSimple
{
void TargetAction();
}
and you use Rocks to create a mock with expectations, along with verifying its usage:
[assembly: Rock(typeof(IAmSimple), BuildType.Create)]
var expectations = new IAmSimpleCreateExpectations();
expectations.Setups.TargetAction();
var mock = expectations.Instance();
mock.TargetAction();
expectations.Verify();
More details can be found on the Overview page.
Additional Documentation
- Discord Server
- Changelog
- Unit testing best practices with .NET Core and .NET Standard
- BenchmarkMockNet
- Unit Testing CSLA Rules With Rocks
Feedback
If you run into any issues, please add them here.
관련 프로젝트 살펴보기
불러오는 중…