File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ This extension provides integration between Ninject and Moq/NSubstitute/RhinoMoc
66
77In your tests, you should use the MockingKernel instead of the StandardKernel. It adds the following features to Ninject:
88
9- 1 . The following syntax will bind a service to the mocked object of a ` Mock<T> ` . and add additional interfaces to the mock:
10- ` Bind<IService>().ToMock(); `
11- You can add additional interfaces to the mock:
12- ` Bind<IService>().ToMock(typeof(IInterface1), typeof(IInterface2)); `
9+ 1 . The following syntax will bind a service to the mocked object of a ` Mock<T> ` .
10+ ``` C#
11+ Bind <IService >().ToMock ();
12+ ```
13+ You can add additional interfaces to the mock.
14+ ``` C#
15+ Bind <IService >().ToMock (typeof (IInterface1 ), typeof (IInterface2 ));
16+ ```
1317
14182 . If you request a service that has no binding, instead of creating an implicit self-binding, the MockingKernel
1519 will create an instance of ` Mock<T> ` and return the mocked object associated with it.
@@ -24,4 +28,4 @@ Hat tip to [Scott Reynolds](http://github.com/scottcreynolds) for the idea, and
2428https://github.com/ninject/Ninject.MockingKernel/wiki
2529
2630## CI build status
27- [ ![ Build Status] ( https://teamcity.bbv.ch/app/rest/builds/buildType:(id:bt34)/statusIcon )] ( http://teamcity.bbv.ch/viewType.html?buildTypeId=bt34&guest=1 )
31+ [ ![ Build Status] ( https://teamcity.bbv.ch/app/rest/builds/buildType:(id:bt34)/statusIcon )] ( http://teamcity.bbv.ch/viewType.html?buildTypeId=bt34&guest=1 )
You can’t perform that action at this time.
0 commit comments