Class NinjectMockSyntaxExtensions
Inheritance
Inherited Members
Namespace: Telerik.JustMock.AutoMock
Assembly: Telerik.JustMock.dll
Syntax
public static class NinjectMockSyntaxExtensions
Methods
AndArrange<T>(IBindingOnSyntax<T>, Action<T>)
Specifies the arrangements to make before the mock is injected.
Declaration
public static IBindingOnSyntax<T> AndArrange<T>(this IBindingOnSyntax<T> builder, Action<T> arrangeActions)
Parameters
IBindingOnSyntax<T>
builder
The fluent syntax. |
System.Action<T>
arrangeActions
A delegate that contains the arrangements to make. Usually, it will contain a series of Mock.Arrange statements for the necessary arrangements and expectations. |
Returns
IBindingOnSyntax<T>
The fluent syntax. |
Type Parameters
T
The service type. |
InjectedIntoParameter<T>(IBindingWhenSyntax<T>, String)
Specifies that the binding should be considered only when injecting into a constructor parameter with the given name.
Declaration
public static IBindingInNamedWithOrOnSyntax<T> InjectedIntoParameter<T>(this IBindingWhenSyntax<T> builder, string parameterName)
Parameters
IBindingWhenSyntax<T>
builder
The fluent syntax. |
System.String
parameterName
The name of the constructor parameter. |
Returns
IBindingInNamedWithOrOnSyntax<T>
The fluent syntax. |
Type Parameters
T
The service type. |
InjectedIntoProperty<T>(IBindingWhenSyntax<T>, String)
Specifies that the binding should be considered only when injecting into a property with the given name.
Declaration
public static IBindingInNamedWithOrOnSyntax<T> InjectedIntoProperty<T>(this IBindingWhenSyntax<T> builder, string propertyName)
Parameters
IBindingWhenSyntax<T>
builder
The fluent syntax. |
System.String
propertyName
The name of the property. |
Returns
IBindingInNamedWithOrOnSyntax<T>
The fluent syntax. |
Type Parameters
T
The service type. |
InjectedIntoProperty<T, TTarget, TProperty>(IBindingWhenSyntax<T>, Expression<Func<TTarget, TProperty>>)
Specifies that the binding should be considered only when injecting into the given property.
Declaration
public static IBindingInNamedWithOrOnSyntax<T> InjectedIntoProperty<T, TTarget, TProperty>(this IBindingWhenSyntax<T> builder, Expression<Func<TTarget, TProperty>> propertyExpr)
Parameters
IBindingWhenSyntax<T>
builder
The fluent syntax. |
System.Linq.Expressions.Expression<System.Func<TTarget, TProperty>>
propertyExpr
An expression referencing the property, e.g.
|
Returns
IBindingInNamedWithOrOnSyntax<T>
The fluent syntax. |
Type Parameters
T
The service type. |
TTarget
The type defining the property. |
TProperty
The type of the property. |
ToMock<T>(IBindingToSyntax<T>)
Indicates that the service should be mocked. The mock is activated in the singleton scope.
Declaration
public static IBindingWhenInNamedWithOrOnSyntax<T> ToMock<T>(this IBindingToSyntax<T> builder)
Parameters
IBindingToSyntax<T>
builder
The fluent syntax. |
Returns
IBindingWhenInNamedWithOrOnSyntax<T>
The fluent syntax. |
Type Parameters
T
The service type. |