Snippet for creating testmethod in VB.NET

· September 7, 2010

I’ve already posted this snippet in C#, but as I from time to time need it in VB.NET I’ll post that too. Here you go:

<?xml version=”1.0” encoding=”utf-8” ?> <CodeSnippets xmlns=””>     <CodeSnippet Format=”1.0.0”>         <Header>             <Title>TestMethod</Title>             <Shortcut>tm</Shortcut>             <Description>Code snippet for creating a testmethod</Description>             <Author>Marcusoft (</Author>             <SnippetTypes>                 <SnippetType>Expansion</SnippetType>                 <SnippetType>SurroundsWith</SnippetType>             </SnippetTypes>         </Header>         <Snippet>             <Declarations>                 <Literal>                     <ID>methodName</ID>                     <ToolTip>The name of the test</ToolTip>                     <Default>methodName</Default>                 </Literal>             </Declarations>             <Code Language=”VB”>               <![CDATA[<TestMethod()> _               Public Sub should_$methodName$()         ‘ Arrange

        ‘ Act

        ‘ Assert         Assert.Fail(“Implement test!”)     End Sub]]>             </Code>         </Snippet>     </CodeSnippet> </CodeSnippets>

Twitter, Facebook