12 September 2011

Pex & Moles CodeRush Templates Version 1.1

Download Mike's updated CodeRush templates, here:  http://bit.ly/nj1hMy

What's new in Mike's CodeRush Templates v. 1.1:
  • New Templates
    • aiot = Assert.IsInstanceOfType(object value, Type expectedType)
    • ainot = Assert.IsNotInstanceOfType(object value, Type expectedType)
  • Updates
    • [mt - automatically inserts type of object on clipboard
    • [hm[ma[mt[pm - Now suppress insertion of an extra ] character at end of the line
    • tm and tmm - Removed marker in the Arrange section
    • tmm - Now inserts [HostType("Moles")] above [TestMethod()], for template consolidation reasons
    • Updated field information box content, in several templates
  • Boring, technical crap
    • Templates import into a category named "Mikes Templates v.1.1", to prevent overwriting modifications to previous templates.  The old category folder must be removed, before using the new templates!
    • Reorganized templates to match the default CodeRush schema
    • Added comments to template categories
    • Added GNU GPL license information to the root node, to guard against legal issues.
UPDATE - 6 OCT 2011
Created a new export from the recent CodeRush update.  Click this link, to download templates.

Mike's CodeRush Templates v. 1.0:

  • ummf    Using MS Moles Framework
     using Microsoft.Moles.Framework;
  • [ma    Moled Assembly Attribute

  • [mt    Moled Type Attribute

  • tm    Test Method
    I really liked the way the Unit Testing with Microsoft Moles document lays out test methods. I modified the existing test method (tm) template, to the following:

  • tmm    Test Moles Method

  • mp    Pex Method

  • [hm    Moles Host Type Attribute

  • [pm    PexMethod Attribute

No comments:

Post a Comment

Please provide details, when posting technical comments. If you find an error in sample code or have found bad information/misinformation in a post, please e-mail me details, so I can make corrections as quickly as possible.