{"id":287388,"date":"2018-08-16T14:08:10","date_gmt":"2018-08-16T10:08:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287388"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287388","title":{"rendered":"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u00ab\u041a\u00bb: Kotlin&#038;Spek"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/company\/qiwi\/blog\/419699\/\" class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 QIWI, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041a\u00bb. <\/p>\n<p>  <a href=\"https:\/\/habr.com\/company\/qiwi\/blog\/419699\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ws\/qx\/ge\/wsqxge0381fvp6h2msyqi3bvnv0.png\"><br \/>  <\/a><br \/>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u0439 \u0438 \u0445\u0430\u0439\u043f\u043e\u0432\u044b\u0439 <a href=\"https:\/\/kotlinlang.org\/\">Kotlin<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/spekframework.org\/\">Spek<\/a>, \u0433\u043b\u0430\u0441\u044f\u0449\u0438\u0439 \u00ab\u0412\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c\u0438\u00bb (You call them tests, we call them specifications). \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0438 \u0432\u0430\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0435\u0441\u044c \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438.<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 Kotlin, \u0430 \u043d\u0435 \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435? Kotlin \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439, \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0435 \u0431\u044b\u043b \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c, \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0436\u0438\u0432\u0443\u044e \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0451\u043c, \u043d\u0435 \u043e\u043f\u0430\u0441\u0430\u044f\u0441\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f <a href=\"http:\/\/spekframework.github.io\/spek\/docs\/latest\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u00abSpek \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Kotlin, \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435, \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 Kotlin\u00bb \u2013 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u044f\u0441\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?\u00bb. <\/p>\n<p>  \u0418\u0442\u0430\u043a\u2026<\/p>\n<h2>\u0427\u0442\u043e \u044d\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p><a name=\"habracut\"><\/a><br \/>  \u041f\u0440\u043e\u0435\u043a\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0430\u0440\u0442\u043d\u0435\u0440\u0430 \u0441\u043e\u0444\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f Android. \u041b\u044c\u0432\u0438\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 back-end, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 REST API. <\/p>\n<p>  \u0414\u043b\u044f \u0441\u0432\u044f\u0437\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0432\u0441\u0435 \u044f\u0441\u043d\u043e: \u043d\u0443\u0436\u0435\u043d \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 framework, HTTP-\u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u043e\u0442\u0447\u0435\u0442\u044b. \u0410 \u0447\u0442\u043e \u0436\u0435 \u0441\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u043d\u0430\u0448\u0443 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u0443\u044e? <\/p>\n<p>  \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d\u0438 \u0436\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u0441\u0442\u043e\u0432. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u2013 BDD. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430 \u0430\u0440\u0435\u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f Kotlin, Spek \u0438 khttp. <br \/>  \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0438\u0442 \u2013 \u041e\u041a, \u0430 \u0433\u0434\u0435 \u0442\u0443\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438?<\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438<\/h2>\n<p>  \u041f\u0440\u0438\u043a\u043e\u043d\u0447\u0438\u0432 \u0434\u0432\u0443\u0445 \u0437\u0430\u0439\u0446\u0435\u0432, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043b\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u043d\u043e\u0432\u044b\u0435 \u0442\u0435\u0441\u0442\u044b.<\/p>\n<p>  \u00ab\u042d\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u0435\u0447\u043d\u043e \u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0440\u0430\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f!\u00bb \u2014 \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043b\u043b\u0435\u0433 \u043f\u043e\u0441\u0435\u0442\u0438\u043b\u0430 \u0442\u0430\u043a\u0430\u044f \u043c\u044b\u0441\u043b\u044c, \u0432 \u0438\u0433\u0440\u0443 \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u0430 \u0414\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442\u0430 \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0435\u0440\u0435\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u043c \u043e\u0442\u0434\u0435\u043b\u043e\u043c \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430: \u0432 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0441\u0440\u043e\u043a\u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c Kotlin, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u043b\u043d\u0438\u0435\u043d\u043e\u0441\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 \u0441\u0435\u0431\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h2>Getting started<\/h2>\n<p>  \u041d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.jetbrains.com\/idea\/\">IntelliJ IDEA<\/a>, \u0430 \u0442\u0430\u043a \u043a\u0430\u043a Kotlin \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/JVM\">JVM<\/a> \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 <a href=\"https:\/\/www.jetbrains.com\/\">JetBrains<\/a>, \u0442\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043c.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0447\u0430\u0442\u044c, \u044d\u0442\u043e \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<br \/>  <code>git clone https:\/\/gerrit.project.com\/k\/autotests<\/code><\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0431\u044b\u043b \u043e\u0442\u043a\u0440\u044b\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <a href=\"https:\/\/gradle.org\/\">gradle<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ac\/ow\/q9\/acowq9lorzdzssh9toa1hbnredu.png\"><\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0430 (*\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e), \u0431\u044b\u043b \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/8564-spek\">\u043f\u043b\u0430\u0433\u0438\u043d<\/a> Spek:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gv\/ox\/sf\/gvoxsfjv1voimnquiaieykoxvxo.png\"><\/p>\n<p>  \u041e\u043d \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u043b \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/af\/b-\/l2\/afb-l2hszwdosplzx-8d1ykuole.png\"><\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f \u0431\u044b\u043b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d, \u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u0430\u043c\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. <\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b<\/h2>\n<p>  \u0411\u0440\u0430\u0432\u044b\u0435 \u043f\u0430\u0440\u043d\u0438 \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u0430 \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u043a \u0442\u043e\u043c\u0443 \u0438\u043b\u0438 \u0438\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443. \u042d\u0442\u043e \u0442\u0435 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043f\u0435\u0448\u0430\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0438 \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430\u043c. <\/p>\n<p>  \u0410 \u0440\u0430\u0437 \u0443\u0436 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u043e \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u043e\u0442\u0434\u0435\u043b \u00ab\u043f\u0440\u043e\u0441\u0438\u0442\u00bb \u0445\u043e\u0442\u044f \u0431\u044b \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a feature. <\/p>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0443\u043f\u0438\u043a\u043e\u0432\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u00ab\u041a\u00bb. \u041d\u043e \u043d\u0435 \u0442\u0443\u0442-\u0442\u043e \u0431\u044b\u043b\u043e:<\/p>\n<ul>\n<li>\u0411\u044b\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e, \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/li>\n<li>\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439;<\/li>\n<li>\u0421\u0442\u0430\u043b\u0438 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Java. <\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0427\u0442\u043e \u0447\u0438\u0442\u0430\u043b\u0438?<\/h2>\n<p>  \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u00ab\u041a\u00bb \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f feature, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: \u00abweb\u00bb \u0438 \u00abmobile\u00bb. <\/p>\n<p>  <b>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 web:<\/b><\/p>\n<ul>\n<li>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f POST-\u0437\u0430\u043f\u0440\u043e\u0441, \u0442\u0435\u043b\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 JSON \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/li>\n<li>\u0414\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f PUT-\u0437\u0430\u043f\u0440\u043e\u0441, \u0442\u0435\u043b\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 JSON \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/li>\n<li>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f DELETE-\u0437\u0430\u043f\u0440\u043e\u0441, \u0442\u0435\u043b\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0443\u0441\u0442\u043e\u0435.<\/li>\n<\/ul>\n<p>  <b>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 mobile:<\/b><\/p>\n<p>  \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f POST-\u0437\u0430\u043f\u0440\u043e\u0441, \u0442\u0435\u043b\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 JSON \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. <\/p>\n<p>  \u0422.\u0435. \u0432 JSON \u0442\u0440\u0438 \u043d\u043e\u0434\u044b:<\/p>\n<ul>\n<li>\u00abadded\u00bb: \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432,<\/li>\n<li>\u00abremoved\u00bb: \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432,<\/li>\n<li>\u00abupdated\u00bb: \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0427\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438?<\/h2>\n<p>  \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0442\u0435\u0441\u0442\u044b\u2013\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0431\u044b\u043b \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b (*\u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Spek), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c. <\/p>\n<p>  <b>\u0414\u043b\u044f web<\/b><\/p>\n<p>  \u0422\u0435\u0441\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430:<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u043e\u0432\u0430\u0440 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u0432\u0430\u0440 (postcondition)<\/li>\n<\/ul>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code>on(\"get changed since when goods added\") {             val goodsUpdateName: String = RandomStringUtils.randomAlphabetic(8)             val date = Date.from(Instant.now()).time - 1              val goodsAdded = post(baseUrl + \"goods\/${user.storeId}\", authHeader,                     json = dataToMap(goods.copy(name = goodsUpdateName)))              it(\"should return the status code OK\") {                 goodsAdded.statusCode.should.be.equal(OK)             }              val goodId = goodsAdded.jsonObject?.optLong(\"id\")              val goodsUpdates = get(baseUrl + \"updates\/goods\/since\/\" + date, authHeader.plus(\"AppUID\" to user.AppUID))              it(\"should return the status code OK\") {                 goodsUpdates.statusCode.should.be.equal(OK)             }              val goodsInsert = goodsUpdates.jsonObject.getJSONArray(\"updated\").toList()                     .map { it as JSONObject }                     .find {                         it.optLong(\"goodId\") == goodId                     }              it(\"should contain goods insert\") {                 goodsInsert.should.be.not.`null`                 goodsInsert?.optString(\"name\").should.be.equal(goodsUpdateName)             }              delete(baseUrl + \"goods\/${user.storeId}\/$goodId\", authHeader)         }<\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430:<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440 (precondition)<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u043e\u0432\u0430\u0440 \u0443\u0434\u0430\u043b\u0438\u043b\u0441\u044f <\/li>\n<\/ul>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code>on(\"get changed since when goods deleted\") {             val goodsUpdateName: String = RandomStringUtils.randomAlphabetic(8)             val date = Date.from(Instant.now()).time - 1              val goodsAdded = post(baseUrl + \"goods\/${user.storeId}\", authHeader,                     json = dataToMap(goods.copy(name = goodsUpdateName)))              it(\"should return the status code OK\") {                 goodsAdded.statusCode.should.be.equal(OK)             }              val goodId = goodsAdded.jsonObject?.optLong(\"id\")              val responseDelete = delete(baseUrl + \"goods\/${user.storeId}\/$goodId\", authHeader)              it(\"should return the status code NO_CONTENT\") {                 responseDelete.statusCode.should.be.equal(NO_CONTENT)             }              val goodsUpdates = get(baseUrl + \"updates\/goods\/since\/\" + date, authHeader.plus(\"AppUID\" to user.AppUID))              it(\"should contain goods deletes\") {                 goodsUpdates.statusCode.should.be.equal(OK)                 goodsUpdates.jsonObject.getJSONArray(\"removed\").toList()                         .map { it as Int }                         .find {                             it == goodId.toInt()                         }                         .should.be.not.`null`             }         }<\/code><\/pre>\n<p>  \u041d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0442\u0432\u0435\u0442\u0430<\/li>\n<li>\u0417\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u0442\u0432\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c 401 Unauthorized.<\/li>\n<\/ul>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code> on(\"get changed since when goods added without authorization\") {             val response = post(baseUrl + \"goods\/${user.storeId}\",                     json = dataToMap(goods))              it(\"should contain an Unauthorized response status and an empty body\") {                 response.statusCode.should.be.equal(UNAUTHORIZED)                 response.text.should.be.equal(\"\")             }         }<\/code><\/pre>\n<p>  <b>\u0414\u043b\u044f mobile<\/b><\/p>\n<p>  \u0411\u044b\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0434 \u0438\u0437 \u0442\u0435\u043b\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. <\/p>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code>package com.qiwi.k.tests  import com.fasterxml.jackson.databind.ObjectMapper import khttp.responses.Response import org.json.JSONObject  val mapper = ObjectMapper()  fun arrayAdded(n: Int): Array&lt;GoodsUpdate&gt; {     return Array(n) { i -&gt; GoodsUpdate() } }  fun getGoodsIds(list: List&lt;GoodsUpdate&gt;): List&lt;Long&gt; {     return Array(list.size) { i -&gt; list[i].goodId }.toList() }  fun getResult(response: Response): List&lt;GoodsUpdate&gt; {     return mapper.readValue(             response.jsonObject.getJSONArray(\"result\").toString(),             Array&lt;GoodsUpdate&gt;::class.java     ).toList() }  fun getCountryIdFromTheResult(response: Response): List&lt;Int&gt; {     val listGoods = mapper.readValue(             response.jsonObject.getJSONArray(\"result\").toString(),             Array&lt;GoodsUpdate&gt;::class.java     ).toList()     return Array(listGoods.size) { i -&gt; listGoods[i].countryId }.toList() }  fun getBody(added: Array&lt;GoodsUpdate&gt; = emptyArray(),             removed: List&lt;Long&gt; = emptyList(),             updated: List&lt;GoodsUpdate&gt; = emptyList()): JSONObject {     return JSONObject(             mapOf(                     \"added\" to added,                     \"removed\" to removed,                     \"updated\" to updated             )     ) } <\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u043e\u0432\u0430\u0440 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440 (postcondition)<\/li>\n<\/ul>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code>on(\"adding goods\") {              val respAdd = post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(added = arrayAdded(count)))             val resultOfAdding = getResult(respAdd)              it(\"should return the status code OK\") {                 respAdd.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count\") {                 resultOfAdding.should.be.size.equal(count)             }              post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(removed = getGoodsIds(resultOfAdding)))         }<\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440 (precondition)<\/li>\n<li>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u0432\u0430\u0440 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440 (postcondition)<\/li>\n<\/ul>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code>on(\"updating goods\") {              val respAdd = post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(added = arrayAdded(count)))             val resultOfAdding = getResult(respAdd)              it(\"should return the status code respAdd OK\") {                 respAdd.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count (resultOfAdding)\") {                 resultOfAdding.should.be.size.equal(count)             }              val respUpdate = post(urlGoodsUpdate,                     authHeaderWithAppUID,                     json = getBody(updated = resultOfAdding.map { it.copy(countryId = REGION_77) })             )              it(\"should return the status code respUpdate OK\") {                 respUpdate.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count (respUpdate)\") {                 getResult(respUpdate).should.be.size.equal(count)             }             it(\"should be all elements are 77\") {                 getCountryIdFromTheResult(respUpdate).should.be.all.elements(REGION_77)             }              post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(removed = getGoodsIds(resultOfAdding)))         }<\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430:<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440 (precondition)<\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u043e\u0432\u0430\u0440<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u0432\u0430\u0440 \u0443\u0434\u0430\u043b\u0438\u043b\u0441\u044f<\/li>\n<\/ul>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code>on(\"deleting goods\") {              val respAdd = post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(added = arrayAdded(count)))             val resultOfAdding = getResult(respAdd)              it(\"should return the status code respAdd OK\") {                 respAdd.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count\") {                 resultOfAdding.should.be.size.equal(count)             }              val respRemoved = post(urlGoodsUpdate,                     authHeaderWithAppUID,                     json = getBody(removed = getGoodsIds(resultOfAdding))             )              it(\"should return the status code respRemoved OK\") {                 respRemoved.statusCode.should.be.equal(OK)             }             it(\"should be empty\") {                 getResult(respRemoved).should.be.empty             }         }<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0439\u0442\u0438 review \u043a\u043e\u0434\u0430. <\/p>\n<h2>Review<\/h2>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u0434\u0435\u0441\u044f\u0442\u043a\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432, \u043c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438 \u0441 dev, \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u0443\u043c\u043e\u0432, \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 Google. \u0418 \u0432\u043e\u0442 \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435.<\/p>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code>package com.qiwi.k.tests.catalog  import \u2026   class GoodsUpdatesControllerSpec : WebSpek({      given(\"GoodsUpdatesController\") {         val OK = HttpResponseStatus.OK.code()         val NO_CONTENT = HttpResponseStatus.NO_CONTENT.code()         val UNAUTHORIZED = HttpResponseStatus.UNAUTHORIZED.code()         val REGION_77 = 77          val auth = login(user)         val accessToken = auth.tokenHead + auth.tokenTail         val authHeader = mapOf(\"Authorization\" to \"Bearer $accessToken\")         val baseUrl = \"http:\/\/test.qiwi.com\/catalog\/\"         val count = 2         val authHeaderWithAppUID = mapOf(\"Authorization\" to \"Bearer $accessToken\", \"AppUID\" to user.AppUID)         val urlGoodsUpdate = \"http:\/\/test.qiwi.com\/catalog\/updates\/goods\/\"          on(\"get changes since\") {             val goodsName: String = goodsForUpdate.name + Random().nextInt(1000)              val date = Date.from(Instant.now()).time - 1              put(baseUrl + \"goods\/${user.storeId}\", authHeader,                     json = dataToMap(goodsForUpdate.copy(name = goodsName)))              val goodsUpdates = get(baseUrl + \"updates\/goods\/since\/\" + date, authHeader.plus(\"AppUID\" to user.AppUID))              it(\"should contain goods updates\") {                 val updates = goodsUpdates.jsonObject.getJSONArray(\"updated\").toList()                         .map { it as JSONObject }                         .find {                             it.optLong(\"goodId\") == goodsForUpdate.id                         }                  updates.should.be.not.`null`                 updates?.optString(\"name\").should.be.equal(goodsName)             }         }          on(\"get changed since when goods added\") {             val goodsUpdateName: String = RandomStringUtils.randomAlphabetic(8)             val date = Date.from(Instant.now()).time - 1              val goodsAdded = post(baseUrl + \"goods\/${user.storeId}\", authHeader,                     json = dataToMap(goods.copy(name = goodsUpdateName)))              it(\"should return the status code OK\") {                 goodsAdded.statusCode.should.be.equal(OK)             }              val goodId = goodsAdded.jsonObject?.optLong(\"id\")              val goodsUpdates = get(baseUrl + \"updates\/goods\/since\/\" + date, authHeader.plus(\"AppUID\" to user.AppUID))              it(\"should return the status code OK\") {                 goodsUpdates.statusCode.should.be.equal(OK)             }              val goodsInsert = goodsUpdates.jsonObject.getJSONArray(\"updated\").toList()                     .map { it as JSONObject }                     .find {                         it.optLong(\"goodId\") == goodId                     }              it(\"should contain goods insert\") {                 goodsInsert.should.be.not.`null`                 goodsInsert?.optString(\"name\").should.be.equal(goodsUpdateName)             }              delete(baseUrl + \"goods\/${user.storeId}\/$goodId\", authHeader)         }          on(\"get changed since when goods deleted\") {             val goodsUpdateName: String = RandomStringUtils.randomAlphabetic(8)             val date = Date.from(Instant.now()).time - 1              val goodsAdded = post(baseUrl + \"goods\/${user.storeId}\", authHeader,                     json = dataToMap(goods.copy(name = goodsUpdateName)))              it(\"should return the status code OK\") {                 goodsAdded.statusCode.should.be.equal(OK)             }              val goodId = goodsAdded.jsonObject?.optLong(\"id\")              val responseDelete = delete(baseUrl + \"goods\/${user.storeId}\/$goodId\", authHeader)              it(\"should return the status code NO_CONTENT\") {                 responseDelete.statusCode.should.be.equal(NO_CONTENT)             }              val goodsUpdates = get(baseUrl + \"updates\/goods\/since\/\" + date, authHeader.plus(\"AppUID\" to user.AppUID))              it(\"should contain goods deletes\") {                 goodsUpdates.statusCode.should.be.equal(OK)                 goodsUpdates.jsonObject.getJSONArray(\"removed\").toList()                         .map { it as Int }                         .find {                             it == goodId.toInt()                         }                         .should.be.not.`null`             }         }          on(\"get changed since when goods added without authorization\") {             val response = post(baseUrl + \"goods\/${user.storeId}\",                     json = dataToMap(goods))              it(\"should contain an Unauthorized response status and an empty body\") {                 response.statusCode.should.be.equal(UNAUTHORIZED)                 response.text.should.be.equal(\"\")             }         }          on(\"adding goods\") {              val respAdd = post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(added = arrayAdded(count)))             val resultOfAdding = getResult(respAdd)              it(\"should return the status code OK\") {                 respAdd.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count\") {                 resultOfAdding.should.be.size.equal(count)             }              post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(removed = getGoodsIds(resultOfAdding)))         }          on(\"updating goods\") {              val respAdd = post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(added = arrayAdded(count)))             val resultOfAdding = getResult(respAdd)              it(\"should return the status code respAdd OK\") {                 respAdd.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count (resultOfAdding)\") {                 resultOfAdding.should.be.size.equal(count)             }              val respUpdate = post(urlGoodsUpdate,                     authHeaderWithAppUID,                     json = getBody(updated = resultOfAdding.map { it.copy(countryId = REGION_77) })             )              it(\"should return the status code respUpdate OK\") {                 respUpdate.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count (respUpdate)\") {                 getResult(respUpdate).should.be.size.equal(count)             }             it(\"should be all elements are 77\") {                 getCountryIdFromTheResult(respUpdate).should.be.all.elements(REGION_77)             }              post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(removed = getGoodsIds(resultOfAdding)))         }          on(\"deleting goods\") {              val respAdd = post(urlGoodsUpdate, authHeaderWithAppUID, json = getBody(added = arrayAdded(count)))             val resultOfAdding = getResult(respAdd)              it(\"should return the status code respAdd OK\") {                 respAdd.statusCode.should.be.equal(OK)             }             it(\"should be equal to the size of the variable count\") {                 resultOfAdding.should.be.size.equal(count)             }              val respRemoved = post(urlGoodsUpdate,                     authHeaderWithAppUID,                     json = getBody(removed = getGoodsIds(resultOfAdding))             )              it(\"should return the status code respRemoved OK\") {                 respRemoved.statusCode.should.be.equal(OK)             }             it(\"should be empty\") {                 getResult(respRemoved).should.be.empty             }         }     } }) <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>  \u0421\u0430\u043c \u043a\u043e\u0434, \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u043c \u0438 \u0437\u043d\u0430\u043d\u0438\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0434\u0430\u043b\u0435\u043a\u0438 \u043e\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0430, \u043d\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0435.<\/p>\n<p>  \u041f\u0440\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0441 Kotlin \u0431\u044b\u043b\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u043d \u2014 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u0432 Java. \u0410 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432\u0441\u0435\u043c\u0438 \u0444\u0438\u0431\u0440\u0430\u043c\u0438 \u0434\u0443\u0448\u0438 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430: \u201c\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 Java\u201d.<\/p>\n<p>  Spek, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u043b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u0422.\u0435. \u0434\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u0445\u043e\u0442\u044f\u0442 \u043a\u0430\u043a \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. <\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e \u2013 \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u0432 master. \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u043e\u0442\u0434\u0435\u043b \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u0433 \u0438\u0437 \u00ab\u041a\u00bb \u0432 \u0442\u0440\u0443\u0434\u043d\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443.<\/p><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/company\/qiwi\/blog\/419699\/\"> https:\/\/habr.com\/company\/qiwi\/blog\/419699\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/company\/qiwi\/blog\/419699\/\" class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 QIWI, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u043c \u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041a\u00bb. <\/p>\n<p>  <a href=\"https:\/\/habr.com\/company\/qiwi\/blog\/419699\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ws\/qx\/ge\/wsqxge0381fvp6h2msyqi3bvnv0.png\"><br \/>  <\/a><br \/>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u0439 \u0438 \u0445\u0430\u0439\u043f\u043e\u0432\u044b\u0439 <a href=\"https:\/\/kotlinlang.org\/\">Kotlin<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/spekframework.org\/\">Spek<\/a>, \u0433\u043b\u0430\u0441\u044f\u0449\u0438\u0439 \u00ab\u0412\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c\u0438\u00bb (You call them tests, we call them specifications). \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0438 \u0432\u0430\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0435\u0441\u044c \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438.<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 Kotlin, \u0430 \u043d\u0435 \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435? Kotlin \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439, \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0435 \u0431\u044b\u043b \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c, \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0436\u0438\u0432\u0443\u044e \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0451\u043c, \u043d\u0435 \u043e\u043f\u0430\u0441\u0430\u044f\u0441\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f <a href=\"http:\/\/spekframework.github.io\/spek\/docs\/latest\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u00abSpek \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Kotlin, \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435, \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 Kotlin\u00bb \u2013 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u044f\u0441\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?\u00bb. <\/p>\n<p>  \u0418\u0442\u0430\u043a\u2026<\/p>\n<h2>\u0427\u0442\u043e \u044d\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\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-287388","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287388","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=287388"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287388\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}