Is it possible to let tests fail or throw an exception if a test calls a method that is not mocked?
exmaple:
method A calls method B and C
B is mocked and C is not mocked, but produces a valid result -> the test is ok, but it is not a valid unit-test.
I need a way to force the developer to write valid unit-tests. That means: as soon as a method calls an "unmocked" method the test should fail or generate an exception.
Is there an easy way to do this?
thx
exmaple:
method A calls method B and C
B is mocked and C is not mocked, but produces a valid result -> the test is ok, but it is not a valid unit-test.
I need a way to force the developer to write valid unit-tests. That means: as soon as a method calls an "unmocked" method the test should fail or generate an exception.
Is there an easy way to do this?
thx