Tag Info

New answers tagged

1

A unit test should test the job that the tested unit has, no more, no less. If your method has the job of acessing the database and issuing UPDATE and INSERT commands as required, then that is what you have to test. When your collaborator is a data base, then issuing SQL is not an implementation detail: it is the behaviour of that unit. Compared to the ...


2

Tests are useful when they break: Proactively or Re-actively. Unit Tests are proactive and may be a continuous functional verification while Integration Tests are reactive on a staged/fake data. If the system under consideration is close to/dependent on data more than computation logic, Integration Tests should get more importance. For example, if we are ...


0

Firstly, I'd try to not run tests on true production databases if possible, but I know this cannot always be avoided. In my tests of this type, I ensure the database is as expected with a range of simple AddEntry, DeleteEntry, AssertEntry and AssertEntryCount routines that either insert, delete, assert the content of, or assert the expected count of rows in ...



Top 50 recent answers are included