File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11This extension provides integration between Ninject and Moq, creating a "lightweight" auto-mocking container.
22In your tests, you should use the MockingKernel instead of the StandardKernel. It adds the following features to Ninject:
33
4- 1 . The following syntax will bind a service to the mocked object of a Mock<T >:
4+ 1 . The following syntax will bind a service to the mocked object of a Mock<T > and add additional interfaces to the mock :
55
6- ` Bind<IService>().ToMock(); `
6+ ` Bind<IService>().ToMock(typeof(IInterface1), typeof(IInterface2) ); `
77
882 . If you request a service that has no binding, instead of creating an implicit self-binding, the MockingKernel
99 will create an instance of Mock<T > and return the mocked object associated with it.
You can’t perform that action at this time.
0 commit comments