diff options
Diffstat (limited to 'tools/MbUnit/VSSnippets/MbUnitVBSnippets')
15 files changed, 848 insertions, 0 deletions
diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/autorunner.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/autorunner.snippet new file mode 100644 index 0000000..3c9e51c --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/autorunner.snippet @@ -0,0 +1,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>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/combinatorialtest.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/combinatorialtest.snippet new file mode 100644 index 0000000..bc46949 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/combinatorialtest.snippet @@ -0,0 +1,54 @@ +<?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="VB"><![CDATA[ <CombinatorialTest()> _
+ Public Sub $testName$( _
+ <UsingFactories("$type1$Factory")] ByVal $arg1Name$ As $type1$, _
+ <UsingFactories("$type2$Factory")] ByVal $arg2Name$ As $type2$)
+
+ End Sub
+
+ <Factory(GetType($type1$))> _
+ public IEnumerable $type1$Factory()
+ {
+ Dim values As $type1$() = New $type1$ { };
+ Return values
+ }
+
+ <Factory(GetType($type2$))> _
+ Public Function $type2$Factory() As IEnumerable
+ Dim values As $type2$() = New $type2$ { };
+ Return values
+ End Function]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/datafixture.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/datafixture.snippet new file mode 100644 index 0000000..5f8f402 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/datafixture.snippet @@ -0,0 +1,61 @@ +<?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>
+ <Default>MbUnitTests</Default>
+ </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="VB"><![CDATA[Imports System
+Imports System.Xml
+Imports MbUnit.Framework
+
+Namespace $namespace$
+ <DataFixture(), _
+ ResourceXmlDataProvider(GetType($name$Test),"$resource$","$resourceXPath$")> _
+ Public Class $name$Test
+ #Region "Test cases"
+ <ForEachTest("$testXPath$")> _
+ Public Sub ForEachTest(ByVal node As XmlNode)
+
+ End Sub
+ #End Region
+ End Class
+End Namespace
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/model.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/model.snippet new file mode 100644 index 0000000..354083c --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/model.snippet @@ -0,0 +1,95 @@ +<?xml version="1.0"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>Model</Title>
+ <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>
+ <Default>MbUnitTests</Default>
+ </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="VB"><![CDATA[Imports System
+Imports TestFu
+Imports TestFu.Models
+
+Namespace $namespace$
+ ''' <summary>
+ ''' A IModel implementation for the $type$ type.
+ ''' </summary>
+ ' <State("Put a state name here")>
+ ' <SubModel("Put a submodel name here")>
+ <Model(GetType($type$))> _
+ Public Class $type$Model
+ Inherits $basetype$Model
+
+ #Region "Constructors"
+ ''' <summary>
+ ''' Initializes a new $type$Model instance.
+ ''' </summary>
+ Public Sub New()
+
+ End Sub
+
+ ''' <summary>
+ ''' Initializes a new "$name$Model" instance to model the modelledType type.
+ ''' </summary>
+ ''' <param name="modelledType">
+ ''' Target Type of the model
+ ''' </param>
+ Public Sub New(ByVal modelledType As Type)
+ MyBase.New(modelledType)
+ If Not GetType($type$).IsAssignableFrom(modelledType)
+ Throw New ArgumentException("$type$ is not assignable from "+modelledType.FullName,"modelledType")
+ End If
+ End Sub
+ #End Region
+
+ #Region "Transitions"
+ <Transition()> _
+ Public Sub SampleTransition(ByVal target As $type$)
+ Throw New NotImplementedException()
+ End Sub
+
+ ''' <summary>
+ ''' Gets the active ITransition instance for current target.
+ ''' </summary>
+ ''' <param name="transitions">
+ ''' Collection of active ITransition names
+ ''' </param>
+ ''' <param name="target">
+ ''' Current tested instance
+ ''' </param>
+ Protected Overrides Sub GetActiveTransitions( _
+ ByVal transitions as ITransitionNameCollection , _
+ ByVal target as Object)
+
+ MyBase.GetActiveTransitions(transitions,target)
+ Dim current As $type$ = DirectCast(target, $type$)
+
+ End Sub
+ #End Region
+ End Class
+End Namespace
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/processtestfixture.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/processtestfixture.snippet new file mode 100644 index 0000000..8b53d58 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/processtestfixture.snippet @@ -0,0 +1,75 @@ +<?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>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>The class being tested</ToolTip>
+ <Default>type</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="VB"><![CDATA[Imports System
+Imports MbUnit.Framework
+
+Namespace $namespace$
+
+ <ProcessTestFixture()> _
+ Public Class $type$Test
+
+ <Test(), _
+ TestSequence(1)> _
+ Public Sub $testName1$()
+
+ End Sub
+
+ <Test(), _
+ TestSequence(2)> _
+ Public Sub $testName2$()
+
+ End Sub
+
+ <Test(), _
+ TestSequence(3)> _
+ Public Sub $testName3$()
+
+ End Sub
+
+ <Test(), _
+ TestSequence(4)> _
+ Public Sub $testName4$()
+
+ End Sub
+
+ End Class
+
+End Namespace]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/rowtest.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/rowtest.snippet new file mode 100644 index 0000000..8919619 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/rowtest.snippet @@ -0,0 +1,113 @@ +<?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="VB"><![CDATA[ <RowTest(), _
+ Row($value1$,$value2$,$value3$), _
+ Row($value4$,$value5$,$value6$), _
+ Row($value7$,$value8$,$value9$), _
+ Row($value10$,$value11$,$value12$), _
+ Row($value13$,$value14$,$value15$)> _
+ Public Sub $testName$(ByVal $arg1Name$ As $type1$, ByVal $arg2Name$ As $type2$, ByVal $arg3Name$ As $type3$)
+
+ End Sub]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/state.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/state.snippet new file mode 100644 index 0000000..c60429a --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/state.snippet @@ -0,0 +1,27 @@ +<?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="VB"><![CDATA[ Public Property $name$State as IState
+ Get
+ Return Me.States("$name$")
+ End Get
+ End Property ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/submodel.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/submodel.snippet new file mode 100644 index 0000000..8f4f645 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/submodel.snippet @@ -0,0 +1,32 @@ +<?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="VB"><![CDATA[ Public ReadOnly Property $name$Model As $model$
+ Get
+ Return DirectCast(Me.SubModels("$name$").Model, $model$)
+ End Get
+ End Property
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/test.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/test.snippet new file mode 100644 index 0000000..625c231 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/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>
+ <Author>MbUnit</Author>
+ <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="VB"><![CDATA[ <Test()> _
+ Public Sub $name$()
+
+ End Sub
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testexpectedexception.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testexpectedexception.snippet new file mode 100644 index 0000000..caac89d --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testexpectedexception.snippet @@ -0,0 +1,32 @@ +<?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 with and expected exception</Description>
+ <Shortcut>testexpectedexception</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>name</ID>
+ <ToolTip>TestName</ToolTip>
+ <Default>Test</Default>
+ </Literal>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>Expected Exception Type</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="VB"><![CDATA[ <Test(),ExpectedException(GetType($type$Exception))> _
+ Public Sub $name$()
+
+ End Sub
+]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testfixture.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testfixture.snippet new file mode 100644 index 0000000..9febc88 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testfixture.snippet @@ -0,0 +1,68 @@ +<?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>
+ <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 TestFixture for the $type$ class.
+ ''' </summary>
+ <TestFixture(), _
+ TestsOn(GetType($type$))> _
+ Public Class $type$Test
+ #Region "Fields, SetUp and TearDown"
+ Private target As $type$ = Nothing
+
+ ''' <summary>
+ ''' Sets up the fixture
+ ''' </summary>
+ <SetUp()> _
+ Public Sub SetUp()
+ Mew.target = New $type$()
+ End Sub
+ ''' <summary>
+ ''' Cleans up the fixture
+ '' </summary>
+ <TearDown()> _
+ public void TearDown()
+ Dim disposable As IDisposable = TryCast(this.target, IDisposable)
+ If disposable IsNot Nothing Then
+ disposable.Dispose()
+ End If
+ End Sub
+ #End Region
+
+ #Region "Test cases"
+ <Test()> _
+ Public Sub Test()
+
+ End Sub
+ #End Region
+ End Class
+End Namespace]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testsuitefixture.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testsuitefixture.snippet new file mode 100644 index 0000000..c47decb --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/testsuitefixture.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>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>
+ <Default>MbUnitTests</Default>
+ </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="VB"><![CDATA[Imports System
+Imports MbUnit.Framework
+
+Namespace $namespace$
+ <TestSuiteFixture()> _
+ Public Class $name$Test
+ <TestSuite()> _
+ Public Function $suiteName$() As TestSuite
+ Dim suite As TestSuite = New TestSuite("$suiteName$")
+
+ Return suite
+ End Function
+ End Class
+End Namespace
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/typefixture.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/typefixture.snippet new file mode 100644 index 0000000..60d4f66 --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/typefixture.snippet @@ -0,0 +1,74 @@ +<?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>
+ <Default>MbUnitTests</Default>
+ </Literal>
+ <Literal>
+ <ID>type</ID>
+ <ToolTip>Tested type</ToolTip>
+ </Literal>
+ <Literal>
+ <ID>instanceName</ID>
+ <Default>instanceName</Default>
+ </Literal>
+ </Declarations>
+ <Code Language="VB"><![CDATA[Imports System
+Imports MbUnit.Core.Framework
+Imports MbUnit.Framework
+
+Namespace $namespace$
+ ''' <summary>
+ ''' A TypeFixture for the $type$ class.
+ ''' </summary>
+ <TypeFixture(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
+
+ #Region "Providers"
+ <Provider(typeof($type$))> _
+ Public Function Provider$type$() As $type$
+ Dim $instanceName$ As $type$ = New $type$()
+ Return $instanceName$
+ End Function
+ #End Region
+ End Class
+End Namespace
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file diff --git a/tools/MbUnit/VSSnippets/MbUnitVBSnippets/typefixturewithproviderfactory.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/typefixturewithproviderfactory.snippet new file mode 100644 index 0000000..72da00b --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/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/tools/MbUnit/VSSnippets/MbUnitVBSnippets/usingmbunit.snippet b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/usingmbunit.snippet new file mode 100644 index 0000000..413759c --- /dev/null +++ b/tools/MbUnit/VSSnippets/MbUnitVBSnippets/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="VB"><![CDATA[Imports MbUnit.Framework
+
+ ]]></Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets>
\ No newline at end of file |
