top-meta icon indicating copy to clipboard operation
top-meta copied to clipboard

Unit Testing Part 2: Mocks and Stubs

Open KevinMulhern opened this issue 4 years ago • 0 comments

Summary

We need a lesson to introduce students to mocks and stubs and their uses in unit tests.

Acceptance Criteria

Lesson content should cover:

  • [ ] What are mocks.
  • [ ] What are command methods?
  • [ ] What are stubs?
  • [ ] How to use them.
  • [ ] Disadvantages.
  • [ ] Exercise: Finish mocking more of the example projects crud actions to its database.
  • [ ] Exercises: Mock a weather service response in a test to make it predicable.
  • [ ] Exercises: Mock a quote of the day service response in a test to make it predicable.
  • [ ] Exercises: Mock a database service response that takes a while in a test to make the test fast.

KevinMulhern avatar Jul 29 '21 00:07 KevinMulhern