Repository navigation
Is there a way to name mocks? #352
|
Sometimes it happens that a test is failing and the error I'm getting is something along the lines of However, it could be that the access of that property is happening in an array, so it's hard to tell which mock has the problem. I usually get around that by adding some debug logging and rerunning the test, however it could be much quicker if I could somehow name the mocks, so that I'd get something like this instead: Is there a way to do that? I tried Thanks for your help. |
Replies: 1 comment 2 replies
|
Hey, @parisBrentas. There's currently no way to name mocks, but the feature is planned! I'm thinking something along the lines of |
Hey, @parisBrentas. There's currently no way to name mocks, but the feature is planned! I'm thinking something along the lines of
mock<T>("name"). I can't promise an ETA right now, but it's at the top of my backlog.