Saturday, November 27, 2010

To copy and paste or not to copy and paste; adventures in unit testing

Yesterday evening. I started my next coding session. I contemplated the validity of copying and pasting unit tests that have similar functionality, but for totally different domains.

I have developed Service classes for a certain module and I can see this functionality the application of this functionality being similar accross the board. Functionality such as CRUD, Search and Search Result Count etc.

The only things that will be different would be the models it uses which will subsequently be using different DB Tables, but yeah... practically the same methods.

I'll sit on this for a

unit testing copy and paste

No comments:

Post a Comment