~/talk

Unit testing your API

Talkat Commit Your Code 2025 · 2025-09-25..09-26· [testing]
links:none on file
slides:none on file

Shows concrete unit tests for a Java Spring API: service layer for a signPlayer feature, using Mockito to mock player and team repositories and an offToken auth object, asserting calls, arguments and exception paths (player missing, retired, insufficient cap). Demonstrates a working demo service, incremental comment‑out approach, and a beforeEach setup that removes repetitive instantiation; code is ~90% complete and tests run green locally.

AI-written summary · about

  1. 0:00Introduction
  2. 2:27Unit testing for teams
  3. 7:00Good unit test traits
  4. 13:03Mocks in isolation
  5. 17:15Demo setup: NHL app
  6. 20:24Service layer testing
  7. 24:00Refactoring tests
  8. 25:45Running tests
  9. 26:28Closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.