Mocker Methods
The Mocker type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() |
AddInjections<(Of <<'(T>)>>) |
Adds the injections to the specified object properties and fields.
|
![]() |
AddMock<(Of <<'(T>)>>)(Mock<(Of <<'(T>)>>), Boolean, Boolean) | |
![]() |
AddProperties(Type, Object) |
Adds a default mock object to the writable properties in the object, if possible.
|
![]() |
AddProperties<(Of <<'(T>)>>)(T) |
Adds a default mock object to the writable properties in the object, if possible.
|
![]() |
AddType(Type, Type, Func<(Of <<'(Mocker, Object>)>>), Boolean, array<Object>[]()[][]) |
Adds an interface to Class mapping to the typeMap for easier resolution.
|
![]() |
AddType<(Of <<'(T>)>>)(Func<(Of <<'(Mocker, T>)>>), Boolean, array<Object>[]()[][]) |
Adds an interface to Class mapping to the typeMap for easier resolution.
|
![]() |
AddType<(Of <<'(TInterface, TClass>)>>)(Func<(Of <<'(Mocker, TClass>)>>), Boolean, array<Object>[]()[][]) |
Adds an interface to Class mapping to the typeMap for easier resolution.
|
![]() ![]() |
BuildExpression<(Of <<'(T>)>>) |
Builds IsAny expression for the Type T.
|
![]() |
CallMethod<(Of <<'(T>)>>) |
Calls the method.
|
![]() |
CreateInstance<(Of <<'(T>)>>)(array<Object>[]()[][]) |
Creates an instance of T. Parameter data allows matching of constructors by type and uses those values in
the creation of the instance.
|
![]() |
CreateInstance<(Of <<'(T>)>>)(Boolean) |
Creates an instance of IFileSystem.
|
![]() |
CreateInstance<(Of <<'(T>)>>)(Boolean, array<Object>[]()[][]) |
Creates the instance.
|
![]() |
CreateInstanceByType<(Of <<'(T>)>>) |
Creates instance by type args.
|
![]() |
CreateInstanceNonPublic(Type, array<Object>[]()[][]) |
Creates the instance of the given type.
Public and non-public constructors are searched.
Parameters allow matching of constructors and using those values in the creation of the instance.
|
![]() |
CreateInstanceNonPublic<(Of <<'(T>)>>)(array<Object>[]()[][]) |
Creates the instance of the given type.
Public and non-public constructors are searched.
Parameters allow matching of constructors and using those values in the creation of the instance.
|
![]() |
CreateMock(Type, Boolean, array<Object>[]()[][]) |
Creates the MockModel from the Type. This throws an exception if the mock already exists.
|
![]() |
CreateMock<(Of <<'(T>)>>)(Boolean, array<Object>[]()[][]) |
Creates the MockModel from the type T. This throws an exception if the mock already exists.
|
![]() |
CreateMockInstance(Type, Boolean, array<Object>[]()[][]) |
Creates an instance of the mock.
|
![]() |
CreateMockInstance<(Of <<'(T>)>>)(Boolean, array<Object>[]()[][]) |
Creates the mock instance that is not automatically injected.
|
![]() |
GetArgData<(Of <<'(T>)>>) |
Gets the argument data for the given type T.
Public and non-public constructors are used.
A data map is used to fill in the data used in the constructor by the parameter type.
If the data is missing for a given parameter type, Mocks or default values are used.
|
![]() |
GetDbContext<(Of <<'(TContext>)>>)(DbContextOptions<(Of <<'(TContext>)>>), DbConnection) |
Gets the database context.
|
![]() |
GetDbContext<(Of <<'(TContext>)>>)(Func<(Of <<'(DbContextOptions, TContext>)>>)) |
Gets the database context.
|
![]() |
GetDbContext<(Of <<'(TContext>)>>)(Func<(Of <<'(DbContextOptions<(Of <<'(TContext>)>>), TContext>)>>), DbContextOptions<(Of <<'(TContext>)>>), DbConnection) |
Gets the database context using a SqlLite DB or provided options and DbConnection.
|
![]() |
GetFileSystem |
Gets the IFileSystem used in this context.
Generally, this means the Mocker.fileSystem property; unless strict is turned on, then it is a Mock.
|
![]() |
GetHttpHandlerSetup |
Gets the HTTP handler setup.
|
![]() ![]() |
GetList<(Of <<'(T>)>>)(Int32, Func<(Of <<'(Int32, T>)>>), Action<(Of <<'(Int32, T>)>>)) |
Gets a list with the specified number of list items, using a custom function.
|
![]() ![]() |
GetList<(Of <<'(T>)>>)(Int32, Func<(Of <<'(Int32, T>)>>)) |
Gets a list with the specified number of list items, using a custom function.
|
![]() ![]() |
GetList<(Of <<'(T>)>>)(Int32, Func<(Of <<'(T>)>>)) |
Gets a list with the specified number of list items, using a custom function.
|
![]() |
GetMessageProtectedAsync<(Of <<'(TMock, TReturn>)>>) |
Gets the message protected asynchronous.
|
![]() |
GetMethodArgData |
Gets the method argument data.
|
![]() |
GetMethodDefaultData |
Gets the method default data.
|
![]() |
GetMock(Type, array<Object>[]()[][]) |
Gets of creates the mock of type.
|
![]() |
GetMock<(Of <<'(T>)>>)(array<Object>[]()[][]) |
Gets or creates the mock of type T.
|
![]() |
GetMock<(Of <<'(T>)>>)(Action<(Of <<'(Mock<(Of <<'(T>)>>)>)>>), array<Object>[]()[][]) |
Gets the mock and allows an action against the mock.
|
![]() |
GetMockAsync<(Of <<'(T>)>>) |
Gets the mock and allows an action against the mock.
|
![]() |
GetMockDbContext(Type) |
Gets the mock database context.
|
![]() |
GetMockDbContext<(Of <<'(TDbContext>)>>)()()()() |
Gets the mock database context.
|
![]() |
GetObject(ParameterInfo) |
Gets the instance for the given ParameterInfo.
|
![]() |
GetObject(Type, Action<(Of <<'(Object>)>>)) |
Gets the instance for the given type.
|
![]() |
GetObject<(Of <<'(T>)>>)(Action<(Of <<'(T>)>>)) |
Gets the instance for the given T and runs the given function against the object.
|
![]() |
GetObject<(Of <<'(T>)>>)()()()() |
Gets the object.
|
![]() |
GetObject<(Of <<'(T>)>>)(array<Object>[]()[][]) |
Gets the object.
|
![]() |
GetProtectedMock(Type, array<Object>[]()[][]) |
Gets the protected mock.
|
![]() |
GetProtectedMock<(Of <<'(T>)>>)(array<Object>[]()[][]) |
Gets the protected mock.
|
![]() |
GetRequiredMock(Type) |
Gets the required mock.
|
![]() |
GetRequiredMock<(Of <<'(T>)>>)()()()() |
Gets the required mock.
|
![]() |
GetRequiredObject<(Of <<'(T>)>>) |
Gets the required object.
|
![]() |
GetStringContent |
Gets the content of the string.
|
![]() |
HasParameterlessConstructor |
Determines whether [has parameterless constructor] [the specified type].
|
![]() |
Initialize<(Of <<'(T>)>>) |
Gets or Creates then Initializes the specified Mock of T.
|
![]() |
InvokeMethod<(Of <<'(TClass>)>>)(String, Boolean, array<Object>[]()[][]) |
Invokes the static method.
|
![]() |
InvokeMethod<(Of <<'(TClass>)>>)(TClass, String, Boolean, array<Object>[]()[][]) |
Invokes the method.
|
![]() |
RemoveMock<(Of <<'(T>)>>) |
Remove specified Mock of T.
|