summaryrefslogtreecommitdiff
path: root/tools/MbUnit/VSSnippets/MbUnitVBSnippets/autorunner.snippet
blob: 3c9e51c2030156796fdc22a351880edc532d607e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>AutoRunner</Title>
      <Author>MbUnit</Author>
      <Description>Expansion snippet for a AutorRunner main.</Description>
      <Shortcut>autorunner</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>name</ID>
          <ToolTip>Main class name</ToolTip>
          <Default>Program</Default>
        </Literal>
        <Literal>
          <ID>namespace</ID>
          <Default>MbUnitTests</Default>
        </Literal>
      </Declarations>
      <Code Language="VB"><![CDATA[Imports System
Imports MbUnit.Core
'Imports MbUnit.Core.Filters

Namespace $namespace$
    Class $name$
        Public Shared Sub Main()
            Using auto As AutoRunner = New AutoRunner()
                ' Note: uncomment "Imports MbUnit.Core.Filters" and the following line if you want to
                ' execute only the fixtures that are tagged with <CurrentFixture()> attribute.
                
                '  auto.Domain.Filter = FixtureFilters.Current
                auto.Run()
                auto.ReportToHtml()
            End Using
        End Sub
    End Class
End Namespace]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>