Describe the solution you'd like
It's possible to create an expectation after a mock is made. This shouldn't be allowed - the design is meant to say, "make your expectations first, then use the mock, then verify it." This can be changed by throwing an ExpectationException when an expectation is set after the mock is made:
ExpectationException.ThrowIf(bool wasMockCreated);
This would be added as the first line of code in each expectation implementation.
Also, while I'm at it, add memberIdentifier to Verify() and pass that value into GetMemberDescription().
Describe the solution you'd like
It's possible to create an expectation after a mock is made. This shouldn't be allowed - the design is meant to say, "make your expectations first, then use the mock, then verify it." This can be changed by throwing an
ExpectationExceptionwhen an expectation is set after the mock is made:This would be added as the first line of code in each expectation implementation.
Also, while I'm at it, add
memberIdentifiertoVerify()and pass that value intoGetMemberDescription().