{"id":572,"date":"2013-07-18T11:04:55","date_gmt":"2013-07-18T11:04:55","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=572"},"modified":"2013-07-18T11:04:55","modified_gmt":"2013-07-18T11:04:55","slug":"how-to-exclude-code-from-code-coverage","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/how-to-exclude-code-from-code-coverage\/","title":{"rendered":"How to exclude code from code coverage"},"content":{"rendered":"<p>In Visual Studio 2012 we can run code coverage analysis across our code (for example across our unit test suite). But we might not want to have all code analysed. For example I don&#8217;t really want to see the test classes as part of the analysis but do want to see the code under test. <\/p>\n<p>So we can exclude code from the code coverage analysis using the <strong>ExcludeFromCodeCoverageAttribute<\/strong>. This can be applied to methods, properties, classes, structs etc. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Visual Studio 2012 we can run code coverage analysis across our code (for example across our unit test suite). But we might not want to have all code analysed. For example I don&#8217;t really want to see the test classes as part of the analysis but do want to see the code under test. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,50],"tags":[],"class_list":["post-572","post","type-post","status-publish","format-standard","hentry","category-c","category-visual-studio"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=572"}],"version-history":[{"count":3,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/572\/revisions"}],"predecessor-version":[{"id":575,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/572\/revisions\/575"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}