summaryrefslogtreecommitdiff
path: root/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets
diff options
context:
space:
mode:
Diffstat (limited to 'build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets')
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/autorunner.snippet48
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/combinatorialtest.snippet56
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/datafixture.snippet63
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/model.snippet101
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/processtestfixture.snippet72
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/rowtest.snippet114
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/state.snippet30
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/submodel.snippet34
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/test.snippet28
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testexpectedexception.snippet34
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testfixture.snippet71
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testsuitefixture.snippet52
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixture.snippet67
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixturewithproviderfactory.snippet77
-rw-r--r--build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/usingmbunit.snippet19
15 files changed, 866 insertions, 0 deletions
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/autorunner.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/autorunner.snippet
new file mode 100644
index 0000000..4cbfc99
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/autorunner.snippet
@@ -0,0 +1,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> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/combinatorialtest.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/combinatorialtest.snippet
new file mode 100644
index 0000000..68abce0
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/combinatorialtest.snippet
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>CombinatorialTest</Title>
+ <Author>MbUnit</Author>
+ <Description>Inserts a combinatorial test with 2 parameters and 2 factories</Description>
+ <HelpUrl>http://www.mertner.com/confluence/display/MbUnit/CombinatorialTestAttribute</HelpUrl>
+ <Shortcut>combinatorial</Shortcut>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>testName</ID>
+ <Default>Test</Default>
+ </Literal>
+ <Literal>
+ <ID>type1</ID>
+ </Literal>
+ <Literal>
+ <ID>type2</ID>
+ <Default>type2</Default>
+ </Literal>
+ <Literal>
+ <ID>arg1Name</ID>
+ <Default>arg1Name</Default>
+ </Literal>
+ <Literal>
+ <ID>arg2Name</ID>
+ <Default>arg2Name</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="CSharp"><![CDATA[ [CombinatorialTest]
+ public void $testName$(
+ [UsingFactories("$type1$Factory")] $type1$ $arg1Name$,
+ [UsingFactories("$type2$Factory")] $type2$ $arg2Name$)
+ {
+
+ }
+
+ [Factory(typeof($type1$))]
+ public IEnumerable $type1$Factory()
+ {
+ $type1$[] values = new $type1$[] { };
+ return values;
+ }
+
+ [Factory(typeof($type2$))]
+ public IEnumerable $type2$Factory()
+ {
+ $type2$[] values = new $type2$[] { };
+ return values;
+ }]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/datafixture.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/datafixture.snippet
new file mode 100644
index 0000000..2d29eb9
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/datafixture.snippet
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>DataFixture</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for DataFixture</Description>
+ <HelpUrl>http://www.mertner.com/confluence/display/MbUnit/DataFixture</HelpUrl>
+ <Shortcut>datafixture</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>namespace</ID>
+ <ToolTip>Test namespace</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>Fixture name</ToolTip>
+ <Default>My</Default>
+ </Literal>
+ <Literal>
+ <ID>resource</ID>
+ <ToolTip>Resource name</ToolTip>
+ <Default>Put the xml resource name here</Default>
+ </Literal>
+ <Literal>
+ <ID>resourceXPath</ID>
+ <ToolTip>Data XPath</ToolTip>
+ <Default>Put the data XPath here</Default>
+ </Literal>
+ <Literal>
+ <ID>testXPath</ID>
+ <ToolTip>Resource XPath</ToolTip>
+ <Default>Put the test case XPath here</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[#region using
+using System;
+using MbUnit.Framework;
+#endregion
+
+namespace $namespace$
+{
+ [DataFixture]
+ [ResourceXmlDataProvider(typeof($name$Test),"$resource$","$resourceXPath$")]
+ public class $name$Test
+ {
+ #region Test cases
+ [ForEachTest("$testXPath$")]
+ public void ForEachTest(XmlNode node)
+ {
+ }
+ #endregion
+ }
+}
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/model.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/model.snippet
new file mode 100644
index 0000000..8ad72c3
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/model.snippet
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>Model</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for a Model</Description>
+ <Shortcut>model</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>namespace</ID>
+ <ToolTip>Model namespace</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>Modelled type</ToolTip>
+ <Default>Put the modelled type here</Default>
+ </Literal>
+ <Literal>
+ <ID>basetype</ID>
+ <ToolTip>Modelled Base Type</ToolTip>
+ <Default>Object</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[using System;
+using TestFu;
+using TestFu.Models;
+
+namespace $namespace$
+{
+ /// <summary>
+ /// A <see cref="IModel"/> implementation for the
+ /// <see cref="$type$"/> type.
+ /// </summary>
+ [Model(typeof($type$))]
+ // [State("Put a state name here")]
+ // [SubModel("Put a submodel name here")]
+ public class $type$Model : $basetype$Model
+ {
+ #region Constructors
+ /// <summary>
+ /// Initializes a new <see cref="$name$Model"/> instance.
+ /// </summary>
+ public $type$Model()
+ :base()
+ {}
+
+ /// <summary>
+ /// Initializes a new <see cref="$name$Model"/> instance
+ /// to model the <paramref name="modelledType"/> type.
+ /// </summary>
+ /// <param name="modelledType">
+ /// Target <see cref="Type"/> of the model
+ /// </param>
+ public $type$Model(Type modelledType)
+ :base(modelledType)
+ {
+ if (!typeof($type$).IsAssignableFrom(modelledType))
+ throw new ArgumentException("$type$ is not assignable from "+modelledType.FullName,"modelledType");
+ }
+ #endregion
+
+ #region Transitions
+ [Transition]
+ public void SampleTransition($type$ target)
+ {
+ throw new NotImplemented();
+ }
+
+ /// <summary>
+ /// Gets the active <see cref="ITransition"/> instance for
+ /// current <paramref name="target"/>.
+ /// </summary>
+ /// <param name="transitions">
+ /// Collection of active <see cref="ITransition"/> names
+ /// </param>
+ /// <param name="target">
+ /// Current tested instance
+ /// </param>
+ protected override void GetActiveTransitions(
+ ITransitionNameCollection transitions,
+ Object target
+ )
+ {
+ base.GetActiveTransitions(transitions,target);
+ $type$ current = ($type$)target;
+
+ $end$
+ }
+ #endregion
+ }
+}
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/processtestfixture.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/processtestfixture.snippet
new file mode 100644
index 0000000..c06df1f
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/processtestfixture.snippet
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>ProcessTestFixture</Title>
+ <Author>MbUnit</Author>
+ <HelpUrl>http://www.mertner.com/confluence/display/MbUnit/ProcessTestFixture</HelpUrl>
+ <Shortcut>processfixture</Shortcut>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>namespace</ID>
+ <Default>MbUnitTests</Default>
+ </Literal>
+ <Literal>
+ <ID>testName1</ID>
+ <Default>Test1</Default>
+ </Literal>
+ <Literal>
+ <ID>testName2</ID>
+ <Default>Test2</Default>
+ </Literal>
+ <Literal>
+ <ID>testName3</ID>
+ <Default>Test3</Default>
+ </Literal>
+ <Literal>
+ <ID>testName4</ID>
+ <Default>Test4</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="CSharp"><![CDATA[using System;
+using MbUnit.Framework;
+
+namespace $namespace$
+{
+ [ProcessTestFixture]
+ public class $type$Test
+ {
+ [Test]
+ [TestSequence(1)]
+ public void $testName1$()
+ {
+
+ }
+
+ [Test]
+ [TestSequence(2)]
+ public void $testName2$()
+ {
+
+ }
+
+ [Test]
+ [TestSequence(3)]
+ public void $testName3$()
+ {
+
+ }
+
+ [Test]
+ [TestSequence(4)]
+ public void $testName4$()
+ {
+
+ }
+ }
+}]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/rowtest.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/rowtest.snippet
new file mode 100644
index 0000000..e16ae38
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/rowtest.snippet
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>RowTest</Title>
+ <Author>MbUnit</Author>
+ <Description>Inserts a row test with 5 rows and 3 parameters.</Description>
+ <HelpUrl>http://www.mertner.com/confluence/display/MbUnit/RowTestAttribute</HelpUrl>
+ <Shortcut>rowtest</Shortcut>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>testName</ID>
+ <Default>Test</Default>
+ </Literal>
+ <Literal>
+ <ID>type1</ID>
+ <Default>type1</Default>
+ </Literal>
+ <Literal>
+ <ID>arg1Name</ID>
+ <Default>arg1Name</Default>
+ </Literal>
+ <Literal>
+ <ID>type2</ID>
+ <Default>type2</Default>
+ </Literal>
+ <Literal>
+ <ID>arg2Name</ID>
+ <Default>arg2Name</Default>
+ </Literal>
+ <Literal>
+ <ID>type3</ID>
+ <Default>type3</Default>
+ </Literal>
+ <Literal>
+ <ID>arg3Name</ID>
+ <Default>arg3Name</Default>
+ </Literal>
+ <Literal>
+ <ID>value1</ID>
+ <Default>value1</Default>
+ </Literal>
+ <Literal>
+ <ID>value2</ID>
+ <Default>value2</Default>
+ </Literal>
+ <Literal>
+ <ID>value3</ID>
+ <Default>value3</Default>
+ </Literal>
+ <Literal>
+ <ID>value4</ID>
+ <Default>value4</Default>
+ </Literal>
+ <Literal>
+ <ID>value5</ID>
+ <Default>value5</Default>
+ </Literal>
+ <Literal>
+ <ID>value6</ID>
+ <Default>value6</Default>
+ </Literal>
+ <Literal>
+ <ID>value7</ID>
+ <Default>value7</Default>
+ </Literal>
+ <Literal>
+ <ID>value8</ID>
+ <Default>value8</Default>
+ </Literal>
+ <Literal>
+ <ID>value9</ID>
+ <Default>value9</Default>
+ </Literal>
+ <Literal>
+ <ID>value10</ID>
+ <Default>value10</Default>
+ </Literal>
+ <Literal>
+ <ID>value11</ID>
+ <Default>value11</Default>
+ </Literal>
+ <Literal>
+ <ID>value12</ID>
+ <Default>value12</Default>
+ </Literal>
+ <Literal>
+ <ID>value13</ID>
+ <Default>value13</Default>
+ </Literal>
+ <Literal>
+ <ID>value14</ID>
+ <Default>value14</Default>
+ </Literal>
+ <Literal>
+ <ID>value15</ID>
+ <Default>value15</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="CSharp"><![CDATA[ [RowTest]
+ [Row($value1$,$value2$,$value3$)]
+ [Row($value4$,$value5$,$value6$)]
+ [Row($value7$,$value8$,$value9$)]
+ [Row($value10$,$value11$,$value12$)]
+ [Row($value13$,$value14$,$value15$)]
+ public void $testName$($type1$ $arg1Name$, $type2$ $arg2Name$, $type3$ $arg3Name$)
+ {
+
+ }]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/state.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/state.snippet
new file mode 100644
index 0000000..5c116d9
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/state.snippet
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>IState wrapper</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for a IState wrapper</Description>
+ <Shortcut>state</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>State Name</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[ public IState $name$State
+ {
+ get
+ {
+ return this.States["$name$"];
+ }
+ }
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/submodel.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/submodel.snippet
new file mode 100644
index 0000000..3d336da
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/submodel.snippet
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>ISubModel wrapper</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for a ISubModel wrapper</Description>
+ <Shortcut>submodel</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>model</ID>
+ <ToolTip>Model type</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>SubModel Name</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[ public $model$ $name$Model
+ {
+ get
+ {
+ return ($model$)this.SubModels["$name$"].Model;
+ }
+ }
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/test.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/test.snippet
new file mode 100644
index 0000000..1b91911
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/test.snippet
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>Test Method</Title>
+ <Description>Expansion snippet for a Test method</Description>
+ <Shortcut>test</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>TestName</ToolTip>
+ <Default>Test</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[ [Test]
+ public void $name$()
+ {
+
+ }
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testexpectedexception.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testexpectedexception.snippet
new file mode 100644
index 0000000..4dbb7b8
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testexpectedexception.snippet
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>Test Method with ExpectedException</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for a Test method</Description>
+ <HelpUrl>http://www.mertner.com/confluence/display/MbUnit/ExpectedExceptionAttribute</HelpUrl>
+ <Shortcut>testexpectedexception</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>TestName</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>Expected Exception Type</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[ [Test]
+ [ExpectedException(typeof($type$Exception))]
+ public void $name$()
+ {
+
+ }
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testfixture.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testfixture.snippet
new file mode 100644
index 0000000..b023d63
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testfixture.snippet
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>TestFixture</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for TestFixture</Description>
+ <Shortcut>testfixture</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>namespace</ID>
+ <ToolTip>Test namespace</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>Tested type</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[using System;
+using MbUnit.Framework;
+
+namespace $namespace$
+{
+ /// <summary>
+ /// A <see cref="TestFixture"/> for the <see cref="$type$"/> class.
+ /// </summary>
+ [TestFixture]
+ [TestsOn(typeof($type$))]
+ public class $type$Test
+ {
+ #region Fields, SetUp and TearDown
+ private $type$ target = null;
+
+ /// <summary>
+ /// Sets up the fixture
+ /// </summary>
+ [SetUp]
+ public void SetUp()
+ {
+ this.target = new $type$();
+ }
+ /// <summary>
+ /// Cleans up the fixture
+ /// </summary>
+ [TearDown]
+ public void TearDown()
+ {
+ IDisposable disposable = this.target as IDisposable;
+ if (disposable!=null)
+ disposable.Dispose();
+ }
+ #endregion
+
+ #region Test cases
+ [Test]
+ public void Test()
+ {
+ $end$
+ }
+ #endregion
+ }
+}
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testsuitefixture.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testsuitefixture.snippet
new file mode 100644
index 0000000..c8de435
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/testsuitefixture.snippet
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>TestSuiteFixture</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for TestSuiteFixture</Description>
+ <Shortcut>testsuitefixture</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>namespace</ID>
+ <ToolTip>Test namespace</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>Fixture name</ToolTip>
+ <Default>My</Default>
+ </Literal>
+ <Literal>
+ <ID>suiteName</ID>
+ <ToolTip>Suite name</ToolTip>
+ <Default>Suite</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[using System;
+using MbUnit.Framework;
+
+namespace $namespace$
+{
+ [TestSuiteFixture]
+ public class $name$Test
+ {
+ [TestSuite]
+ public TestSuite $suiteName$()
+ {
+ TestSuite suite = new TestSuite("$suiteName$");
+
+ $end$
+
+ return suite;
+ }
+ }
+}
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixture.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixture.snippet
new file mode 100644
index 0000000..490e531
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixture.snippet
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>TypeFixture</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for TypeFixture</Description>
+ <HelpUrl>http://www.mertner.com/confluence/display/MbUnit/TypeFixture</HelpUrl>
+ <Shortcut>typefixture</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>namespace</ID>
+ <ToolTip>Test namespace</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>Tested type</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="csharp"><![CDATA[using System;
+using MbUnit.Framework;
+
+namespace $namespace$
+{
+ /// <summary>
+ /// A <see cref="TypeFixture"/> for the <see cref="$type$"/> class.
+ /// </summary>
+ [TypeFixture(typeof($type$))]
+ //[ProviderFactory(typeof($type$Factory),typeof($type$))]
+ [TestsOn(typeof($type$))]
+ public class $type$Test
+ {
+ #region SetUp and TearDown
+ /// <summary>
+ /// Initializes the fixture
+ /// </summary>
+ [SetUp]
+ public void SetUp($type$ value)
+ {
+ }
+ /// <summary>
+ /// Cleans up the fixture
+ /// </summary>
+ [TearDown]
+ public void TearDown($type$ value)
+ {
+ }
+ #endregion
+
+ #region Test cases
+ [Test]
+ public void Test($type$ value)
+ {
+ $end$
+ }
+ #endregion
+ }
+}
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixturewithproviderfactory.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixturewithproviderfactory.snippet
new file mode 100644
index 0000000..72da00b
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/typefixturewithproviderfactory.snippet
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>TypeFixture with Provider Factory</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for TypeFixture</Description>
+ <Shortcut>typefixturefac</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>namespace</ID>
+ <ToolTip>Test namespace</ToolTip>
+ <Default>MbUnitTests</Default>
+ </Literal>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>Tested type</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="VB"><![CDATA[Imports System
+Imports MbUnit.Framework
+
+Namespace $namespace$
+
+ ''' <summary>
+ ''' A TypeFixture for the $type$ class.
+ ''' </summary>
+ <TypeFixture(GetType($type$)), _
+ ProviderFactory(GetType($type$Factory), GetType($type$)), _
+ TestsOn(GetType($type$))> _
+ Public Class $type$Test
+
+ #Region "SetUp and TearDown"
+ ''' <summary>
+ ''' Initializes the fixture
+ ''' </summary>
+ <SetUp()> _
+ Public Sub SetUp(ByVal value As $type$)
+
+ End Sub
+ ''' <summary>
+ ''' Cleans up the fixture
+ ''' </summary>
+ <TearDown()> _
+ Public Sub TearDown(ByVal value As $type$)
+
+ End Sub
+ #End Region
+
+ #Region "Test cases"
+ <Test()> _
+ Public Sub Test(ByVal value As $type$)
+
+ End Sub
+ #End Region
+
+ End Class
+
+ Public Class $type$Factory
+ <Factory()> _
+ Public ReadOnly Property Factory As $type$
+ Get
+ Return New $type$
+ End Get
+ End Property
+ End Class
+
+End Namespace
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file
diff --git a/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/usingmbunit.snippet b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/usingmbunit.snippet
new file mode 100644
index 0000000..c1d9113
--- /dev/null
+++ b/build/tools/mbunit/VSSnippets/MbUnitCSharpSnippets/usingmbunit.snippet
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>Using MbUnit Includes</Title>
+ <Author>MbUnit</Author>
+ <Description>Expansion snippet for the MbUnit using statements</Description>
+ <Shortcut>usingMbUnit</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Code Language="csharp"><![CDATA[using MbUnit.Framework;
+
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file