Created
August 22, 2018 20:29
-
-
Save ffMathy/6b9fbc41f262fcc5c7b1ef2626b1a10a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 = Substitute.for<RealCalculator>(); | |
mockedCalculator.add(1, 2); | |
mockedCalculator.received(1).add(1, 2); //called exactly once | |
mockedCalculator.received().add(1, 2); //called at least once |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment