-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I would like to have the Callback functionality, like Moq does, for instance, so I could log or calculate the number of times a call with the certain command text was executed. What would be the best way of achieving that?
For example:
public int MyTableCalls { get; private set; }
...
dbConnecton.Mocks
.When(cmd => cmd.CommandText.Contains("UPDATE MyTable") && cmd.Parameters.Count() == 1)
.Callback(() => MyTableCalls++ ) // <<< this is what I would like to have
.ReturnsScalar(1);Metadata
Metadata
Assignees
Labels
No labels