Created
August 22, 2018 20:30
-
-
Save ffMathy/465e986a12c06e0914e9c9baf57db6f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mockedCalculator = TypeMoq.Mock.ofType(RealCalculator); | |
const calculator = mockedCalculator.object; | |
calculator.add(1, 2); | |
mockedCalculator.verify(x => x.add(1, 2), TypeMoq.Times.once()); //called exactly once | |
mockedCalculator.verify(x => x.add(1, 2), TypeMoq.Times.atLeastOnce()); //called at least once |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment