summaryrefslogtreecommitdiff
path: root/tools/MbUnit/VSSnippets/MbUnitCSharpSnippets/autorunner.snippet
blob: 4cbfc993c3368cc7bd0dcda4e8c4cc70a088b957 (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
46
47
48
<?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>
      </Declarations>
      <Code Language="CSharp"><![CDATA[using System;

namespace MbUnit.Tests
{
    using MbUnit.Core;
    using MbUnit.Core.Filters;

    static class $name$
    {
        public static void Main(string[] args)
        {
            using (AutoRunner auto = new AutoRunner())
            {
                // Note: uncomment if you want to execute only the fixtures
                // that are tagged with [CurrentFixture] attribute.
                //
                //  auto.Domain.Filter = FixtureFilters.Current;
                auto.Run();
                auto.ReportToHtml();
            }
        }
    }
}

	]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>