typemoq icon indicating copy to clipboard operation
typemoq copied to clipboard

It.passes

Open cdibbs opened this issue 6 years ago • 0 comments

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.

cdibbs avatar Jul 28 '18 15:07 cdibbs