3
I am working on a project and participating in a team , we were given the task of doing a series of tests with a system,testes de integração continua
, testes unitários
....
The point is that all systems have entity classes and business rules. So ,it is very interesting to test the classes of business rules.
My entity classes only have the usual:
atributos
getters() and setters()
construtor()
toString()
equals()
hashcode()
compareTo()
But I have a doubt about the classes of entity:
I must do testes unitários
for my classes of entity (Beans or pojos) since they have no business rule?
There is behavior in their entities (in addition to
equals
,hashCode
,toString
)? Only you can tell if tests are needed in this layer, but the answer to an application developed following DDD principles will probably be quite different from the answer to an application with a more anemic model. Test what to add value.– Anthony Accioly