logoalt Hacker News

deepsunyesterday at 10:57 PM1 replyview on HN

No, some other library classes accept only their own, not my adapter.

Not mentioning of course needless copy-pasting dosens of members in the adapter. And it must be in prod code, not tests, even though it's documentation would say "Adapter for X, exists only for tests, to be able to mock X".


Replies

wiseowiseyesterday at 11:01 PM

You wrap whole 3rd party dependency in an adapter.

show 1 reply