I'm testing a class ClassA
that takes an instance of a class ClassB
in its constructor. In my test of ClassA
, I mock ClassB
with NSubstitue
. However, ClassB
overload the *
operator. How can I set the Result
of the *
operation for my ClassB
mockup?
Asked
Active
Viewed 212 times
0

François
- 3,164
- 25
- 58
-
1Can you please add the two classes to the question? – Ralph Willgoss Mar 19 '20 at 15:43
-
2https://stackoverflow.com/questions/11898447/mocking-the-behaviour-of-operators-in-moq-c-sharp – Ralph Willgoss Mar 19 '20 at 15:52
-
Don't mock it ! – Fabio Mar 30 '20 at 07:28