Random programming things I'd want to remember

Wednesday, January 17, 2018

Visual Studio snippet for a TestMethod with a proper naming convention (naming convention was proposed by Roy Osherove)

Here it is, see this post for details on how to import it into your Visual Studio. Enjoy!

<?xml version="1.0" encoding="utf-8"?>
  <CodeSnippet Format="1.0.0">
      <Title>Test method with a naming convention</Title>
      <Author>Roy Osherove, yevgeller</Author>
      <Description>Test method with the following naming convention: method under testing, condition, and expected results. The naming convention was taken from Roy Osherove's book "The Art of Unit Testing"</Description>
          <ToolTip>Replace with the method that you want to test</ToolTip>
          <ToolTip>Condition that you want to test</ToolTip>
          <ToolTip>The result that you expect</ToolTip>
        <Code Language="csharp">
          public void $NameOfMethodUnderTest$_$ConditionYouAreTesting$_$ExpectedResult$()


No comments: