{"id":258933,"date":"2015-06-09T10:10:02","date_gmt":"2015-06-09T06:10:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258933"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258933","title":{"rendered":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 junit-checkcode \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 TDD"},"content":{"rendered":"<p>     \t\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0443\u043f\u0440\u0430\u0436\u043d\u044f\u044f\u0441\u044c \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 TDD \u043d\u0430 Java \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u0442\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044d\u0442\u043e \u043a\u0440\u043e\u043f\u043e\u0442\u043b\u0438\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u0448\u0435\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 junit-quickcheck, \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u0435\u0448\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f. <\/p>\n<p>  \u041a \u0441\u043b\u043e\u0432\u0443, \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <a href=\"http:\/\/habrahabr.ru\/post\/240811\/\">\u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a>, \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438<\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Java \u0438 \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442. \u0423 \u043c\u0435\u043d\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 gradle. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0439 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/tree\/feature\/helloworld\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0432\u043e\u0442 \u0441 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430: d9bd97eaec20427e725f9a4c3ff0c0d36cc27ea3 \u043f\u0440\u043e\u0435\u043a\u0442 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 TDD. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043f\u043e\u043b\u043e\u0433\u0435\u0442\u044b TDD \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u044f \u0431\u044b \u0441 \u043d\u0438\u043c\u0438 \u043f\u043e\u0441\u043f\u043e\u0440\u0438\u043b. \u041c\u043e\u044f IDE (IntelliJ IDEA) \u0443\u043c\u0435\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0430\u0447\u043d\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441 <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/0490415ecfea58fb0a75e4b96f90c958dc960834\">\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/a>:  <\/p>\n<pre><code class=\"java\">public class HelloSayer { } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u043a\u043e\u0434 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442 \u043d\u0430 github.<\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u044f \u043f\u043e\u043f\u0440\u043e\u0448\u0443 \u0441\u0432\u043e\u044e IDE \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043d\u0435 \u0442\u0435\u0441\u0442 \u0438 \u0434\u0430\u043b\u0435\u0435 \u043d\u0430\u0447\u043d\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e \u0441\u0445\u0435\u043c\u0435 test-first. \u041f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0441\u0434\u0435\u043b\u0430\u044e, \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u044e \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u042f \u0445\u043e\u0447\u0443 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441 \u043a\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0437\u0434\u043e\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u044f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u043c\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<br \/>  <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/8162299f8fe6a8d924a173ac12479c6dd3d74cc0\">\u0412\u043e\u0442<\/a> \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u044e \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0441\u0442:  <\/p>\n<pre><code class=\"java\">    @Test     public void testCreating() throws Exception {         new HelloSayer(&quot;World&quot;);     } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0435\u0441\u0442\u044c, \u0442\u0435\u0441\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0439.<\/p>\n<p>  \u041d\u0443 \u0441\u0434\u0435\u043b\u0430\u044e \u0442\u0435\u0441\u0442 \u0437\u0435\u043b\u0435\u043d\u044b\u043c. \u041c\u043e\u044f IDE \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u043a\u0430\u043a \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0435, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/26dbbd25542d7b0ccbdbac3b99908c90a30ef535\">\u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/a> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0442\u0435\u0441\u0442:  <\/p>\n<pre><code class=\"java\">public class HelloSayer {    public HelloSayer(String whom) {    } }<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0435\u0441\u0442, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u043d\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u043e\u0442 \u043d\u0435\u0433\u043e \u0445\u043e\u0442\u0435\u043b. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/9496ef269cc034f3843334a0159c9c3de133782b\">\u0421\u043e\u0437\u0434\u0430\u044e \u0442\u0435\u0441\u0442<\/a> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <b>getWhom<\/b> \u2014 \u044d\u0442\u043e \u0433\u0435\u0442\u0442\u0435\u0440, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u0441\u043c\u043e\u0433\u0443 \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u043e\u043c\u0443 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435:  <\/p>\n<pre><code class=\"java\">    @Test     public void testWhomGetter() throws Exception {         HelloSayer sayer = new HelloSayer(&quot;World&quot;);         assertEquals(&quot;World&quot;, sayer.getWhom());     } <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0435\u043a\u0442 \u043e\u043f\u044f\u0442\u044c \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0435\u0441\u0442\u044c, \u0442\u0435\u0441\u0442 \u043e\u043f\u044f\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u044b\u0439. <\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c. <br \/>  <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/d8ae54fa2446d8147876093501294400e87f0d4fm\/risik\/tdd-book-java\/commit\/d8ae54fa2446d8147876093501294400e87f0d4f\">\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u044e<\/a> \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0433\u0435\u0442\u0442\u0435\u0440:  <\/p>\n<pre><code class=\"java\">public class HelloSayer {     private String whom;      public HelloSayer(String whom) {     }      public String getWhom() {         return whom;     }  } <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0435\u043a\u0442 \u0443\u0436\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u0442\u0435\u0441\u0442 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b, \u043d\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/c1b924524f25547f58958ac3f663a5edb19bab98\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c<\/a> \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443, \u0430 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u044d\u0442\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0440\u0430\u043d\u044c\u0448\u0435:  <\/p>\n<pre><code class=\"java\">     public HelloSayer(String whom) {         this.whom = whom;      } <\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442 \u043e\u043f\u044f\u0442\u044c \u0437\u0435\u043b\u0435\u043d\u044b\u0439.<\/p>\n<p>  \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435, \u043d\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435. \u0412 \u044d\u0442\u043e\u043c \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f \u0434\u0435\u043b\u0430\u044e \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u0439 \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e. \u042d\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0438\u0445 \u0448\u0430\u0433\u043e\u0432. \u0414\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<br \/>  \u0425\u043e\u0442\u044f \u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043c\u0438\u0442 \u0431\u044b\u043b \u00ab\u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u043c\u00bb. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0434\u0435\u0441\u044c: <a href=\"http:\/\/seesparkbox.com\/foundry\/atomic_commits_with_git\">seesparkbox.com\/foundry\/atomic_commits_with_git<\/a>. \u041a\u0440\u0430\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u044f: \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0412\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442.<\/p>\n<h2>\u0417\u0435\u043b\u0435\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439<\/h2>\n<p>  \u041d\u0443 \u0442\u0435\u043f\u0435\u0440\u044c, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430: \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. <br \/>  <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/1afad7d25045fbd2ca2d3619b57abedaebca242a\">\u0412\u043e\u0442<\/a> \u044d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442:  <\/p>\n<pre><code class=\"java\">    @Test     public void testGreetingString() throws Exception {         HelloSayer sayer = new HelloSayer(&quot;World&quot;);         assertEquals(&quot;Hello \\&quot;World\\&quot;&quot;, sayer.getGreetingString());     } <\/code><\/pre>\n<p>  \u042f \u043e\u0436\u0438\u0434\u0430\u044e, \u0447\u0442\u043e \u0438\u043c\u044f \u0442\u043e\u0433\u043e, \u043a \u043a\u043e\u043c\u0443 \u043c\u043e\u0439 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f, \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u044f\u0442\u043e \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0438. \u0422\u0435\u0441\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0439. <\/p>\n<p>  <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/507011ce6e0fd13425d43e5fe30a0aac133e2999\">\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c<\/a> \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<pre><code class=\"java\">    public String getGreetingString() {         return &quot;Hello \\&quot;World\\&quot;&quot;;     } <\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442 \u0437\u0435\u043b\u0435\u043d\u044b\u0439. \u042f \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e! \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <b>getWhom<\/b> \u044f \u043c\u043e\u0433 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435, \u043d\u043e \u0432 \u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u0441\u0435 \u043f\u043e \u0447\u0435\u0441\u0442\u043d\u043e\u043c\u0443, \u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u043b\u0435\u043d\u0438\u043b\u0441\u044f.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0442\u0435\u0441\u0442\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u043d\u043e \u043a\u043b\u0430\u0441\u0441 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c: \u043c\u0430\u043b\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438, \u0430 \u043d\u0435 \u0432 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043c \u0436\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c, \u0447\u0442\u043e \u043f\u0438\u0448\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u044d\u0442\u043e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c, \u0445\u043e\u0442\u044f \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0435\u0441\u0442\u0443. <\/p>\n<p>  \u041d\u043e, \u0432\u043e \u0432\u0442\u043e\u0440\u044b\u0445, \u0435\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u0441\u0442\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0448\u0443\u0442 \u0432\u0441\u0435 \u0436\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043b\u044e\u0434\u0438. \u0410 \u0432\u043e \u043f\u0435\u0440\u0432\u044b\u0445, \u0431\u044b\u0432\u0430\u044e\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445.<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0442\u0435\u0441\u0442 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 <b>whom<\/b>. \u041d\u043e \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a. \u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0435\u0441\u0442 \u043d\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u00abWorld\u00bb, \u043a\u0430\u043a \u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b, \u0430 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 junit-quickcheck: <a href=\"https:\/\/github.com\/pholser\/junit-quickcheck\">github.com\/pholser\/junit-quickcheck<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 Theories \u0438\u0437 JUnit. <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/7ca99ae3866cfef0ba926965e34f7f925e7a24ad\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e<\/a> \u0435\u0435 \u043a \u043c\u043e\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443.  <\/p>\n<pre><code class=\"diff\">     dependencies {          testCompile 'junit:junit:4.+' +        testCompile 'com.pholser:junit-quickcheck-core:0.5+' +        testCompile 'com.pholser:junit-quickcheck-generators:0.5+'      }  <\/code><\/pre>\n<p>  \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f 0.5, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 alpha, \u043d\u043e \u0432 \u043d\u0435\u0439 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Java 8, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u044f <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/17016c6f4bceee4911623af2d608f07ca750ee11\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b<\/a> \u0437\u0430\u043d\u043e\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <b>greetingString<\/b>:  <\/p>\n<pre><code class=\"java\">    @Theory     public void greetingString(             @ForAll String whom     ) {         HelloSayer sayer = new HelloSayer(whom);         assertEquals(String.format(&quot;Hello \\&quot;%s\\&quot;&quot;, whom), sayer.getGreetingString());     } <\/code><\/pre>\n<p>  \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f  <a href=\"http:\/\/habrahabr.ru\/users\/theory\/\" class=\"user_link\">Theory<\/a> \u043f\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 therories. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f  <a href=\"http:\/\/habrahabr.ru\/users\/forall\/\" class=\"user_link\">ForAll<\/a> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439. junit-quickcheck \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0443\u043c\u0435\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0435\u0441\u0442 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u043a\u0440\u0430\u0441\u043d\u044b\u0439, \u043a\u0430\u043a \u043d\u0430\u043c \u0438 \u043d\u0430\u0434\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u044f <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/e32647c04c63c71fec89aaf1c45c7708ce681110\">\u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044e<\/a> \u043c\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <b>getGreetingString<\/b>:  <\/p>\n<pre><code class=\"java\">    public String getGreetingString() {         return String.format(&quot;Hello \\&quot;%s\\&quot;&quot;, whom);     } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0435\u0441\u0442 \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0442\u0430\u043a\u0430\u044f, \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0431\u044b \u0431\u044b\u0442\u044c. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u0438 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434. \u042f \u0431\u044b \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b. \ud83d\ude42<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u044f <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/154d02f4902773a25644a3494f315b2485892829\">\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b<\/a> \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u043a.<br \/>  \u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u043f\u043e\u0440\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442, \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439. \u0415\u0441\u043b\u0438 \u0412\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0412\u0430\u0448 \u043a\u043e\u0434, (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435) \u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442. \u041e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e. \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e, \u043d\u0443\u0436\u043d\u0443\u044e \u0412\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0443. \u041d\u043e \u044f, \u0432\u0441\u0435 \u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u0442\u0435\u0441\u0442\u044b \u0441 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0439 \u0448\u0442\u0440\u0438\u0448\u0435\u043a \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u044f <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/44e31d9ee304989d16bc3bff6bb324c56d0cd205\">\u0434\u043e\u0431\u0430\u0432\u0438\u043b<\/a> \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e Jacoco. \u041f\u0440\u043e\u0433\u043e\u043d\u044f\u044e, \u0441\u043c\u043e\u0442\u0440\u044e \u043e\u0442\u0447\u0435\u0442 \u0438 \u0440\u0430\u0434\u0443\u044e\u0441\u044c 100% \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u00ab\u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0439\u00bb \u043a\u043b\u0430\u0441\u0441 <b>HelloSayer<\/b>. \u041c\u043d\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<br \/>  \u0410 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e, \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f String.format \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <b>getGreetingString<\/b>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u041e\u041a, \u0430 \u0435\u0441\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u044f \u0432\u044b\u043d\u0435\u0441\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 HelloSayer \u0438 \u0441\u0434\u0435\u043b\u0430\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439. \u0417\u0434\u0435\u0441\u044c \u044f \u043e\u043f\u044f\u0442\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 IntelliJ IDEA \u043f\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0443. <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/8d77fe55d427566e33403353177b4f76be78c6c7\">\u0412\u043e\u0442<\/a> \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435. \u0422\u0435\u043f\u0435\u0440\u044c HelloSayer \u0441\u0442\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0430\u043c \u0431\u044b\u043b\u0430 \u0443\u0448\u043b\u0430 \u0432 \u043a\u043b\u0430\u0441\u0441 HelloSayerInplace.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:  <\/p>\n<pre><code class=\"java\">package info.risik.books.tdd.HelloWorld;  public interface HelloSayer {     String getWhom();       String getGreetingString(); } <\/code><\/pre>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f:  <\/p>\n<pre><code class=\"java\">package info.risik.books.tdd.HelloWorld;  public class HelloSayerInplace implements HelloSayer {     private String whom;      public HelloSayerInplace(String whom) {         this.whom = whom;     }      @Override     public String getWhom() {         return whom;     }      @Override     public String getGreetingString() {         return String.format(&quot;Hello \\&quot;%s\\&quot;&quot;, whom);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u044e \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438 \u0445\u0440\u0430\u043d\u0438\u0442 \u0435\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435. \u0422\u0435\u0441\u0442 \u044f \u0442\u043e\u0436\u0435 <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/66641409f1594b370d8b561ba6896615f391231b\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b<\/a>, \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c-\u0438-\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438 \u043f\u043e\u0438\u0441\u043a-\u0438-\u0437\u0430\u043c\u0435\u043d\u0430:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 <b>HelloSayerAtOnce<\/b>.  <\/p>\n<pre><code class=\"java\">package info.risik.books.tdd.HelloWorld;  public class HelloSayerAtOnce implements HelloSayer {     private String whom;     private String message;      public HelloSayerAtOnce(String whom) {         this.whom = whom;         this.message = String.format(&quot;Hello \\&quot;%s\\&quot;&quot;, whom);     }      @Override     public String getWhom() {         return whom;     }      @Override     public String getGreetingString() {         return message;     } } <\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0434\u043b\u044f \u043d\u0435\u0433\u043e:  <\/p>\n<pre><code class=\"java\">package info.risik.books.tdd.HelloWorld;  import com.pholser.junit.quickcheck.ForAll; import junit.framework.TestCase; import org.junit.contrib.theories.Theories; import org.junit.contrib.theories.Theory; import org.junit.runner.RunWith;  @RunWith(Theories.class) public class HelloSayerAtOnceTest extends TestCase {      @Theory     public void testCreating(             @ForAll String whom     ) {         new HelloSayerAtOnce(whom);     }      @Theory     public void testWhomGetter(             @ForAll String whom     ) {         HelloSayer sayer = new HelloSayerAtOnce(whom);         assertEquals(whom, sayer.getWhom());     }      @Theory     public void greetingString(             @ForAll String whom     ) {         HelloSayer sayer = new HelloSayerAtOnce(whom);         assertEquals(String.format(&quot;Hello \\&quot;%s\\&quot;&quot;, whom), sayer.getGreetingString());     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u042f \u0445\u043e\u0447\u0443 \u0435\u0449\u0435 \u0442\u0440\u0435\u0442\u044c\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0440\u0435\u0442\u0438\u0439 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043e\u043f\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c-\u0438-\u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438 \u043f\u043e\u0438\u0441\u043a-\u0438-\u0437\u0430\u043c\u0435\u043d\u0430. \u042d\u0442\u043e \u043f\u043b\u043e\u0445\u043e. \u0412\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438, \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043b \u0432 \u0442\u0435\u0441\u0442\u0435. \u042f \u0445\u043e\u0447\u0443 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f DRY (don&#8217;t repeat youself). \u0422\u043e \u0435\u0441\u0442\u044c, \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0442\u0435\u0441\u0442 \u043a\u043e \u0432\u0441\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u043d\u0435 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043e\u043f\u044f\u0442\u044c \u043f\u0440\u0438\u0448\u0435\u043b junit-quickchecker. <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/68c287eebe96b5279e581dbf75236f3998a65101\">\u0412\u043e\u0442<\/a> \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442:  <\/p>\n<pre><code class=\"java\">@RunWith(Theories.class) public class HelloSayerTest {      enum HelloSayerType {         InPlace,         AtOnce,     }  \/\/...     @Theory     public void testWhomGetter(             @ForAll String whom,             @ForAll @ValuesOf HelloSayerType sayerType     ) throws Exception {         HelloSayer sayer = getFactory(sayerType, whom);         assertEquals(whom, sayer.getWhom());     } \/\/...     private HelloSayer getFactory(HelloSayerType type, String whom) throws Exception {         switch (type) {             case InPlace:                 return new HelloSayerInplace(whom);             case AtOnce:                 return new HelloSayerAtOnce(whom);         }         throw new Exception(&quot;Unknown HelloSayerType&quot;);     } } <\/code><\/pre>\n<p>  \u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043e\u0434\u0438\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434: \u0442\u0438\u043f \u043a\u043b\u0430\u0441\u0441\u0430 (\u0432 \u0432\u0438\u0434\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f). \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 junit-checker \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e  @ValuesOf. \u0418, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0432\u0441\u0435 \u0447\u0442\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. <\/p>\n<p>  <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/ecea8e643e9e2bd379b573c5d762405892b891e9\">\u041f\u0435\u0440\u0435\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e<\/a> \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043d\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/b4092eb73177e1efeef6e4cf8c0d888539c393df\">\u0443\u0434\u0430\u043b\u044f\u044e<\/a> \u0435\u0433\u043e.<\/p>\n<p>  \u0418 \u043d\u0430 \u0437\u0430\u043a\u0443\u0441\u043a\u0443, <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/50eada1752aacca71b92ea2ae30655fd338a6b60\">\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e<\/a> \u0442\u0440\u0435\u0442\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 HelloSayer:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f HelloSayer \u0441 \u043b\u0435\u043d\u0438\u0432\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package info.risik.books.tdd.HelloWorld;  public class HelloSayerLazy implements HelloSayer {     private String whom;     private String message;      public HelloSayerLazy(String whom) {         this.whom = whom;         this.message = null;     }      @Override     public String getWhom() {         return whom;     }      @Override     public String getGreetingString() {         if (message == null) {             makeMessage();         }         return message;     }      private void makeMessage() {         message = String.format(&quot;Hello \\&quot;%s\\&quot;&quot;, whom);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e <a href=\"https:\/\/github.com\/risik\/tdd-book-java\/commit\/5a50b25dd6fb20df1b47b21f72b937197ac37cc7\">\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c<\/a> \u0442\u043e\u043b\u044c\u043a\u043e 3 \u0441\u0442\u0440\u043e\u043a\u0438:  <\/p>\n<pre><code class=\"diff\">     enum HelloSayerType {          InPlace,          AtOnce, +        Lazy,      }        @Theory  @@ -53,6 +54,8 @@ private HelloSayer getFactory(HelloSayerType type, String whom) throws Exception                  return new HelloSayerInplace(whom);              case AtOnce:                  return new HelloSayerAtOnce(whom); +            case Lazy: +                return new HelloSayerLazy(whom);          }          throw new Exception(&quot;Unknown HelloSayerType&quot;);      } <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044e, \u0447\u0442\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043e\u0434\u0430 \u0432\u0441\u0435 \u0435\u0449\u0435 100%. \u0412\u0441\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e!<\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f<\/h2>\n<p>  \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 Java: <a href=\"https:\/\/github.com\/risik\/tdd-book-java\">github.com\/risik\/tdd-book-java<\/a><br \/>  \u0422\u0435\u043a\u0441\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438: <a href=\"https:\/\/github.com\/risik\/tdd-book\/blob\/master\/helloworld\/simple_test.ru.md\">github.com\/risik\/tdd-book\/blob\/master\/helloworld\/simple_test.ru.md<\/a><br \/>  \u0422\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f habrahabr.ru: <a href=\"https:\/\/github.com\/risik\/tdd-book\/blob\/master\/helloworld\/simple_test.ru.habr.txt\">github.com\/risik\/tdd-book\/blob\/master\/helloworld\/simple_test.ru.habr.txt<\/a><br \/>  \u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f: <a href=\"https:\/\/github.com\/risik\/tdd-book\/blob\/master\/helloworld\/simple_test.ru.md\">CC-BY-NC-SA<\/a>     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/259859\/\"> http:\/\/habrahabr.ru\/post\/259859\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0443\u043f\u0440\u0430\u0436\u043d\u044f\u044f\u0441\u044c \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 TDD \u043d\u0430 Java \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u0442\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044d\u0442\u043e \u043a\u0440\u043e\u043f\u043e\u0442\u043b\u0438\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u0448\u0435\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 junit-quickcheck, \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u0435\u0448\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f. <\/p>\n<p>  \u041a \u0441\u043b\u043e\u0432\u0443, \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <a href=\"http:\/\/habrahabr.ru\/post\/240811\/\">\u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a>, \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-258933","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=258933"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258933\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}