I use NSubstitute to bully the class using the PartsOf() method (I need some of the methods to work). It looks like this:
var mock = Substitute.ForPartsOf<MyWorker>(); mock.Start().Returns(void);
Simple code, almost the same as in NSubstitute documentation, but instead I get this exception: "An exception of type 'NSubstitute.Exceptions.CouldNotSetReturnDueToNoLastCallException' occurred in NSubstitute.dll but was not handled in user code Additional information: Could not find a call to return from."
What is the problem?
source share