{"id":64,"date":"2009-09-21T09:56:31","date_gmt":"2009-09-21T07:56:31","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=64"},"modified":"2009-09-21T09:56:31","modified_gmt":"2009-09-21T07:56:31","slug":"my-resharper-templates-for-unit-testing","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/my-resharper-templates-for-unit-testing","title":{"rendered":"My ReSharper templates for Unit Testing"},"content":{"rendered":"<p>As I always have problem synchronizing my office and home machine&#8217;s templates I thought this would be good place to store them.<\/p>\n<h3>Inline templates (LiveTemplates.xml)<\/h3>\n<p><strong>test<\/strong><\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n&#x5B;Test]\npublic void Method_Condition_Result()\n{\n\t$END$\n}\n<\/pre>\n<p><strong>setup<\/strong><\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n&#x5B;SetUp]\npublic void SetUp()\n{\n\t$END$\n}\n<\/pre>\n<p><strong>record<\/strong><\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nusing(mocks.Record())\n{\n\t$END$\n}\n<\/pre>\n<p><strong>play<\/strong><\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nusing(mocks.Playback())\n{\n\t$END$\n}\n<\/pre>\n<h3>File templates (FileTemplates.xml)<\/h3>\n<p><strong>NUnitTestFile<\/strong><\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nusing NUnit.Framework;\n\nnamespace $Namespace$\n{\n    &#x5B;TestFixture]\n    public class $FileName$\n    {\n        &#x5B;Test]\n        public void Method_Condition_Result()\n        {\n        }\n    };\n}\n<\/pre>\n<p><a href='\/blog\/wp-content\/uploads\/2009\/09\/FileTemplates.xml'>FileTemplates<\/a><br \/>\n<a href='\/blog\/wp-content\/uploads\/2009\/09\/LiveTemplates.xml'>LiveTemplates<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I always have problem synchronizing my office and home machine&#8217;s templates I thought this would be good place to store them. Inline templates (LiveTemplates.xml) test &#x5B;Test] public void Method_Condition_Result() { $END$ } setup &#x5B;SetUp] public void SetUp() { $END$ } record using(mocks.Record()) { $END$ } play using(mocks.Playback()) { $END$ } File templates (FileTemplates.xml) NUnitTestFile [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8],"tags":[15,47,56],"class_list":["post-64","post","type-post","status-publish","format-standard","hentry","category-programming","category-tools","tag-c","tag-resharper","tag-unit-testing"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/64"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":0,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}