Right-B[I]CEP: Checking Inverse Relationships
Learn about writing the unit tests with the inverse relationship technique.
Logical inverse relationships
Sometimes, we’ll be able to check behavior by applying its logical inverse. For mathematical computations, this is often the case. We can:
- Verify division with multiplication
- Verify addition with subtraction
Implementation of the square-root function
Let’s take a look at the square-root function using Newton’s algorithm. ...
Access this course and 1400+ top-rated courses and projects.