It's necessary?
I write explicit tests for everything except simple getters and setters.
If the getter or setter contains only the reverse bla; or this.blah = blah; I do not think there is much value. In most cases, they are generated, and I feel that time spent together can be better spent elsewhere.
, . POJO ( Java) Java, . IOC (Inversion Of Control), Spring, POJO, .
Java bean - Java-, getBlah() setBlah(), . Java beans POJO.
, : " POJO ( -)?" .
: " Java beans ( - )?" , , .
PoJos , , , , .
, . , .
"". , : . , , , , , .
, , , - , , (.. , - ).
, pojos , , .
.
, . -.
POJO . , ( , ). ; , , , :-) , Cobertura, Clover Emma , . , .
, , , . , - TDD, , , POJO ( POCOs .net peeps) . , TDD /, unit test.
, TDD , , IMHO.
, , , , .
, POJO, , , - . POJO equals() hashCode().:) POJO !:)
, equals() hashCode() !
Pojos .
, !;)
, . , , .
, ?
Test Driven Development, pojos (, , pojos).
. , ...
, " " , .
"" :
, ...
, POJO, :
1. POJO , POJO , , . POJO.
2. POJO , /getters/seters, , (CGLIB). , POJO.
Source: https://habr.com/ru/post/1697095/More articles:Perl: проблема с переменной областью с модулями CGI и DBI - variablesIs it possible to store and retrieve a boolean in a varchar field using Java JDBC? - javaHelp with vector merge algorithm - c ++Symbol of annuity or angle in LaTeX - mathHow to implement redirection for all requests (under certain conditions)? - redirectIs the YUI Loader disposable reliable? - javascriptDate Manipulation of components - dateDependency Injection and Circular Link - oopIn classic asp, can I save the database connection in a Session object? - sessionHow can I save a date, which can be partial (i.e. only a year, maybe a month), and display it later with the same specification? - datetimeAll Articles