Unit tests should preferably be independent of external services, systems and files. The standard way to achieve this is to create mocks. A mock is an object that can be used in place of the real resource and act in a predictable way to ensure the tests always give the same result. I think that this is… Continue reading Using Transactions for Unit Tests
Tag: Transactions
Transaction Safety for Manual SQL Updates
When maintaining a system that is in production there are often issues that need to be solved by running custom SQL scripts directly in the production database. There can be different reasons for this: Updating a lookup table to add a new option to dropdown boxes, where there is no user interface for handling the… Continue reading Transaction Safety for Manual SQL Updates