Open tengl opened 2 years ago
In this (artificial) example, wouldn't it be sufficient to give a more meaningful name to the test method itself (say, Caller_does_not_invoke_component_for_values_not_between_2_and_43
)? Your test runner would then output that method name for the test failure. Seems like a simpler solution than having to extend the tooling...
Yeah, it was a bad example. There are more complicated inputs where renaming the test is not as easy. But maybe we should duplicate the test into several facts instead, and give the tests more descriptive names.
@tengl, have you since found a solution that works for you (without us having to extend Moq), or do you still want to follow up on this?
@stakx Sorry for the late reply. I haven't been working in that part of the code for a while. But I guess that breaking the theory into several almost identical facts would solve the issue.
But I still think that a message would be nice to have, but not critical.
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.
I would like to have a message on tests when
VerifyNoOtherCalls
fails. It would be useful if you have a number of cases where the mock should not be called in aTheory
.Consider following (artificial) example, where it would be nice to have the
failMsg
printed in output if the test fails.