Last active
October 16, 2023 19:32
-
-
Save ChrisMash/4192e2109e2d91597fe5a5f5896b175f to your computer and use it in GitHub Desktop.
A UT that does an improved job of verifying expected behaviour
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
mockedDependency = mock(DependencyOfUnitBeingTested) | |
sut = UnitBeingTested("a value", mockedDependency) | |
verify(sut.value) | |
.is("a value") | |
verify(mockedDependency) | |
.callMadeTo(functionCalledByUnitBeingTested) | |
.withParameter("a value") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment