Guest User

Untitled

a guest
Jun 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. # Testing Guidelines
  2.  
  3. ## Test Only Public API
  4. Testing internal implementation leads to fragile tests that break often for no good reason.
  5.  
  6. ## Use Arrange, Act, Assert
  7. Each test should test a single situation, and have three parts.
  8. - __Arrange__: Preparing
  9. - __Act__: Triggering the function being tested
  10. - __Assert__: Match actual outcome with expected one
  11.  
  12. ## Naming Tests
  13. Test name has three parts:
  14. - Method Name
  15. - Condition
  16. - Expected Outcome
  17.  
  18. Use `test__METHOD__TESTED_CONDITION__EXPECTED_OUTCOME`.
Add Comment
Please, Sign In to add comment