MSTestGlider

MSTestGlider is a Visual Studio 2008/2010 add-in that provides 6 macros for faster test-driven development with MSTest or NUnit.


What The Macros Do

ToggleBetweenTestsAndClassUnderTest():


CloseAllButTestsAndClassUnderTest():


GoToTestsForMethod() and GoToMethodForTests():

TestNamingConvention=1 style (OneTestClassPerMethodUnderTest):


TestNamingConvention=2 style (OneTestClassPerClassUnderTest):


GoToTestInitializeOrSetUp():


GoToDefinitionFromAccessorCall():


ToggleBetweenDotCppAndDotHFile():
Similar to ToggleBetweenTestsAndClassUnderTest().

CloseAllButDotCppAndDotHFile():
Similar to CloseAllButTestsAndClassUnderTest().

RenameActiveDocument():
This macro saves you from having to find a file in the Solution Explorer prior to renaming it.

Included MSTest Code Snippets



The "Must" code snippets above require this code, which serves as a replacement for the troublesome [ExpectedException] attribute:
public static class Must
{
  public static void Throw<T>(Action action) where T : Exception
  {
     if (action == null)
        throw new ArgumentNullException("action");

     try
     {
        action();
        Assert.Fail("action() did not throw expected exception " 
           + typeof(T).ToString() + ".");
     }
     catch (Exception e)
     {
        Assert.AreEqual(typeof(T), e.GetType());
     }
  }
}

Included Typemock Isolator Code Snippets


How To Install




Last edited Mar 23 at 6:20 PM by Neil_, version 81