-
Notifications
You must be signed in to change notification settings - Fork 3
Settings
Settings can be defined per Database scope or globally. The settings that are available are described below.
To provide settings per Database, pass an instance of the Settings object to the MockConnection constructor.
To define global settings, update the properties on the Settings.Default instance.
After every DB command reset the dapper cache of commands. This allows for some commands to be more accurately verified when there are very similar input or type parameters
A type that can support building the params (parameters) type in a different way. By default an anonymous object will be dynamically built and then passed to the verifiable method.
A comparer that allows for flexible SQL comparison. This, by default, ignores white space at the start and end of each line. Replace this to vary the comparison on SQL text.
This type provides comparison of the Dapper command Identity type. Replace this comparer if you want to vary the comparison method.
Where dapper parameters cannot be resolved, these settings will be used to fill in the blanks.
Reverse engineering dapper calls from command invocations can result in ambiguous dapper method calls, where one can be for an overload which takes a CommandDefinition and one which doesn't. This setting allows control over which overload should be preferred.
By default CommandDefinition overloads are unfavoured.