
{"id":2133,"date":"2016-11-29T17:33:08","date_gmt":"2016-11-29T22:33:08","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=2133"},"modified":"2016-11-29T17:33:08","modified_gmt":"2016-11-29T22:33:08","slug":"thank-g-d-for-unit-tests","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=2133","title":{"rendered":"Thank G-d for Unit Tests"},"content":{"rendered":"<p>If anyone tells you unit tests are a waste of time, send them to this post.<\/p>\n<p>I am in the middle of some major refactoring of our bills generator. Billing, you know, is full of lots of not-so-obvious details. E.g. I have just caught a bug where I kept only internal users instead of throwing them out and keeping only external users. Your regular &#8216;missing  one character&#8217; error that is almost impossible to spot by just looking at the code.<\/p>\n<p><code>Subscriptions = Usage.Subscriptions<br \/>\n.Where(s=><font color=\"red\"><strong>!<\/strong><\/font>checker.IsUserInternalToProduct(s.User, InternalUsers))<br \/>\n.ToArray();<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If anyone tells you unit tests are a waste of time, send them to this post. I am in the middle of some major refactoring of our bills generator. Billing, <a href=\"https:\/\/ikriv.com\/blog\/?p=2133\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[8,5],"tags":[],"class_list":["entry","author-ikriv","post-2133","post","type-post","status-publish","format-standard","category-cs","category-dev"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2133"}],"version-history":[{"count":2,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2133\/revisions"}],"predecessor-version":[{"id":2135,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2133\/revisions\/2135"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}