You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Simplify TestDataServiceUpdatingSubscribers using DataServiceSubscriber
Replace complex DataSubscriber pattern with simpler DataServiceSubscriber:
- Remove unnecessary DataSubscriber subclassing
- Eliminate FakeDataAssembler and FakePipe machinery
- Directly implement extractors property and trigger method
- Reduce boilerplate from ~15-20 lines to ~8-10 lines per test
The tests still validate all critical behavior (cascading updates,
transactions, circular dependencies) but are now much clearer and match
actual production usage patterns where DataServiceSubscriber is used
with callbacks rather than DataSubscriber subclasses.
All 38 tests pass.
---
Original prompt: Please investigate if TestDataServiceUpdatingSubscribers
has any value. It may have been written for a mechanism that is no longer
in use. Please ultrathink about why it uses the DataSubscriber and
assembler mechanism. What is really under test here? Do we have (or can
we write) simpler but equivalent tests using a plain DataServiceSubscriber?
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments