AutoMocker.With method (1 of 4)
June 4, 2021 · View on GitHub
Creates an instance of implementationType and registers it for service type implementationType. This is a convenience method for Use(implementationType, CreateInstance(implementationType))
public void With(Type implementationType)
See Also
- class AutoMocker
- namespace Moq.AutoMock
AutoMocker.With method (2 of 4)
Creates an instance of implementationType and registers it for service type serviceType. This is a convenience method for Use(serviceType, CreateInstance(implementationType))
public void With(Type serviceType, Type implementationType)
See Also
- class AutoMocker
- namespace Moq.AutoMock
AutoMocker.With<TImplementation> method (3 of 4)
Creates an instance of TImplementation and registers it as for service type TImplementation. This is a convenience method for Use<TImplementation>(CreateInstance<TImplementation>())
public void With<TImplementation>()
where TImplementation : class
| parameter | description |
|---|---|
| TImplementation | The service implementation type |
See Also
- class AutoMocker
- namespace Moq.AutoMock
AutoMocker.With<TService,TImplementation> method (4 of 4)
Creates an instance of TImplementation and registers it as for service type TService. This is a convenience method for Use<TService>(CreateInstance<TImplementation>())
public void With<TService, TImplementation>()
where TImplementation : class, TService
| parameter | description |
|---|---|
| TService | The service type |
| TImplementation | The service implementation type |
See Also
- class AutoMocker
- namespace Moq.AutoMock