プロジェクト
概要
A mocking library based on the Compiler APIs (Roslyn + Mocks)
言語・ランタイム計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルRocks

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.
関連プロジェクトを探す
読み込み中…