Let's refactor a test: Payment report

from blog Just Some Code, | ↗ original
Let’s refactor a test to follow our unit testing best practices. This test is based on a real test I had to modify in one of my client’s projects. Imagine this test belongs to a payment gateway. The system takes payments on behalf of partners. At the end of every month, the partners get the collected payments discounting any fees. This process is...