Testing functions
summary
Shows how pulling logic into small Kotlin functions (examples: messagesOnlyIfLoggedIn, combineMessages, fetchMessages) replaces brittle Android-heavy classes, removes thread switching, and lets unit tests run without PowerMock. Uses Mockito only for higher-level providers but proves core logic tests need no mocks. Team reports ~2,000 unit tests running in ~20–30s after refactor. Demo merges server/local lists, filters deletions, sorts results, and the extracted functions behave deterministically and are easy to assert.
AI-written summary · about
chapters (12)
- 0:00Intro
- 1:52Presentation plan
- 2:28Testable code
- 4:12Untestable code
- 5:55Solution
- 6:26Business logic
- 13:14Testing
- 24:24Fetch messages
- 25:30Selling points
- 28:33FAQ
- 30:14Lazy way
- 31:09Questions








