Code Snippet: Async Unit Test Methods

This is based upon my original UnitTestMethod.Snippet Gist, this C# Code Snippet can be used within Visual Studio to generates Asynchronous Unit Test Methods (Functions).

How to Use

  1. Save the Code Snippet file as UnitTestMethod.Snippet
  2. For for VS 2015, move the UnitTestMethod.Snippet file into this directory: %userprofile%\Documents\Visual Studio 2015\Code Snippets\Visual C#\My Code Snippets
  3. Once installed type: utestasync + [Tab] + [Tab]
public void MethodName_Condition_ExpectedResult()
 // Arrange

 // Act
 var result = await Task.FromResult<object>(null);

 // Assert

Code Snippet: Unit Test Methods


Recent Posts

Buy Siôn a beer…

If you have found my website useful and would like to buy me a beer, please click on this Donate PayPal button.

%d bloggers like this: