Would it possible to allow one statement that merges When() and Verify() calls? Either like Verify(When()) or When().Verify()? (Perhaps implemented by an automatically created hidden object's destructor, if that helped, so the verifications automatically happened when the current scope closed.) It would be especially nice to not have the same .Matching() in two spots, on both When() and Verify().
Would it be possible to have a strict mode, perhaps as a flag to Mock<> or Mock<>.get() that would assume any When() expected .Exactly(1), and also at the end VerifyNoOtherInvocations()? I realize others might not like this, but I'd love to be able to just use the When() statements to create my exact sequence of invocations, without even having to add any extra syntax to the When() calls.
Would it possible to allow one statement that merges
When()
andVerify()
calls? Either likeVerify(When())
orWhen().Verify()
? (Perhaps implemented by an automatically created hidden object's destructor, if that helped, so the verifications automatically happened when the current scope closed.) It would be especially nice to not have the same.Matching()
in two spots, on bothWhen()
andVerify()
.Would it be possible to have a strict mode, perhaps as a flag to
Mock<>
orMock<>.get()
that would assume anyWhen()
expected.Exactly(1)
, and also at the endVerifyNoOtherInvocations()
? I realize others might not like this, but I'd love to be able to just use theWhen()
statements to create my exact sequence of invocations, without even having to add any extra syntax to theWhen()
calls.