Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
The repository proponents are mostly trying to reduce the interface you need to mock in order to test your business logic, especially with unit testing, not integration testing. If you're just depending on the db context, (and you're mocking with the really awesome MockQueryable library) the tester needs to know exactly which parts of the db context are being used. This is not how unit testing should work. When writing unit tests, you shouldn't have to know that much about the internal behaviour of the thing you are trying to mock.
RX vs classic Events, do you have a preference? I have looked at RX very closely often. Its cool, but takes some getting used to, so I tent to stick with classic events for both ease on myself and other developers. Do you have a preference between RX and classic Event Args?