typemoq
typemoq copied to clipboard
It.passes
For better interop, could TypeMoq add an It.passes
, or something, to be used with external assertion libraries?
As it stands, I have to write something like:
this.i18nMock.verify(i => i(
'some thing',
It.is(b => {
Assert(b).deeplyEquals(expectedBag);
return true;
})),
Times.once());
Or, depending on the library, I have to typecast the assertion's non-falsy return value to any
. Not a huge deal, but it potentially leaves the developer feeling like they have hacky tests.
Thanks for considering this.