Skip to content

Commit

Permalink
Went ahead and created the initial file templates for StepDefinition …
Browse files Browse the repository at this point in the history
…and EventDefinition. Reinstalled add-in and both show up and work when adding a new file. Just need to finish adding the xml to pass the arguments into the attributes for Given, When, Then for the StepDefinition and the code comments for the methods in both templates.
  • Loading branch information
dragan committed Jun 1, 2010
1 parent 29c7841 commit d0cd853
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

<Extension path="/MonoDevelop/Ide/FileTemplates">
<FileTemplate id="SpecFlowFeatureTemplate" resource="SpecFlowFeature.xft.xml"/>
<FileTemplate id="SpecFlowStepDefinition" resource="SpecFlowStepDefinition.xft.xml"/>
<FileTemplate id="SpecFlowEventDefinition" resource="SpecFlowEventDefinition.xft.xml"/>
</Extension>

<Extension path="/MonoDevelop/Ide/CustomTools">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
<EmbeddedResource Include="Gui\SpecFlowFeatureIcon.ico">
<LogicalName>SpecFlowFeatureIcon.ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Gui\SpecFlowEventDefinitionIcon.ico">
<LogicalName>SpecFlowEventDefinitionIcon.ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Gui\SpecFlowStepDefinitionIcon.ico">
<LogicalName>SpecFlowStepDefinitionIcon.ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Templates\SpecFlowStepDefinition.xft.xml">
<LogicalName>SpecFlowStepDefinition.xft.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Templates\SpecFlowEventDefinition.xft.xml">
<LogicalName>SpecFlowEventDefinition.xft.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Folder Include="Templates\" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0"?>
<Template originator="SineSignal, LLC"
created="2010/05/31"
lastModified="2010/05/31">
<!-- Template Header -->
<TemplateConfiguration>
<_Name>SpecFlow Event Definition</_Name>
<Icon>res:SpecFlowEventDefinitionIcon.ico</Icon>
<_Category>NUnit</_Category>
<LanguageName>*</LanguageName>
<_Description>Creates a SpecFlow Event Definition file.</_Description>
</TemplateConfiguration>

<!-- Template Content -->
<TemplateFiles>
<CodeDomFile>
<CompileUnit>
<Namespaces>
<Namespace Name="">
<Imports>
<NamespaceImport Namespace="System"/>
<NamespaceImport Namespace="TechTalk.SpecFlow"/>
</Imports>
</Namespace>
<Namespace Name="${Namespace}">
<Types>
<TypeDeclaration Name="${Name}" IsClass="true">
<CustomAttributes>
<AttributeDeclaration Name="Binding"/>
</CustomAttributes>
<Members>
<MemberMethod Attributes="Public, Final" Name="BeforeStep" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="BeforeStep"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="AfterStep" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="AfterStep"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="BeforeScenarioBlock" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="BeforeScenarioBlock"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="AfterScenarioBlock" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="AfterScenarioBlock"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="BeforeScenario" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="BeforeScenario"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="AfterScenario" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="AfterScenario"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="BeforeFeature" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="BeforeFeature"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="AfterFeature" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="AfterFeature"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="BeforeTestRun" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="BeforeTestRun"/>
</CustomAttributes>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="AfterTestRun" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="AfterTestRun"/>
</CustomAttributes>
</MemberMethod>
</Members>
</TypeDeclaration>
</Types>
</Namespace>
</Namespaces>
</CompileUnit>
</CodeDomFile>
</TemplateFiles>
</Template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0"?>
<Template originator="SineSignal, LLC"
created="2010/05/31"
lastModified="2010/05/31">
<!-- Template Header -->
<TemplateConfiguration>
<_Name>SpecFlow Step Definition</_Name>
<Icon>res:SpecFlowStepDefinitionIcon.ico</Icon>
<_Category>NUnit</_Category>
<LanguageName>*</LanguageName>
<_Description>Creates a SpecFlow Step Definition file.</_Description>
</TemplateConfiguration>

<!-- Template Content -->
<TemplateFiles>
<CodeDomFile>
<CompileUnit>
<Namespaces>
<Namespace Name="">
<Imports>
<NamespaceImport Namespace="System"/>
<NamespaceImport Namespace="TechTalk.SpecFlow"/>
</Imports>
</Namespace>
<Namespace Name="${Namespace}">
<Types>
<TypeDeclaration Name="${Name}" IsClass="true">
<CustomAttributes>
<AttributeDeclaration Name="Binding"/>
</CustomAttributes>
<Members>
<MemberMethod Attributes="Public, Final" Name="GivenIHaveEnteredSomethingIntoTheCalculator" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="Given">
</AttributeDeclaration>
</CustomAttributes>
<Parameters>
<ParameterDeclarationExpression Type="System.Int32" Name="number"/>
</Parameters>
<Statements>
<MethodInvokeExpression>
<Method>
<MethodReferenceExpression MethodName="Pending">
<TargetObject>
<TypeReferenceExpression Type="ScenarioContext.Current"/>
</TargetObject>
</MethodReferenceExpression>
</Method>
</MethodInvokeExpression>
</Statements>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="WhenIPressAdd" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="When">
</AttributeDeclaration>
</CustomAttributes>
<Statements>
<MethodInvokeExpression>
<Method>
<MethodReferenceExpression MethodName="Pending">
<TargetObject>
<TypeReferenceExpression Type="ScenarioContext.Current"/>
</TargetObject>
</MethodReferenceExpression>
</Method>
</MethodInvokeExpression>
</Statements>
</MemberMethod>
<MemberMethod Attributes="Public, Final" Name="ThenTheResultShouldBe" ReturnType="System.Void">
<CustomAttributes>
<AttributeDeclaration Name="Then">
</AttributeDeclaration>
</CustomAttributes>
<Parameters>
<ParameterDeclarationExpression Type="System.Int32" Name="result"/>
</Parameters>
<Statements>
<MethodInvokeExpression>
<Method>
<MethodReferenceExpression MethodName="Pending">
<TargetObject>
<TypeReferenceExpression Type="ScenarioContext.Current"/>
</TargetObject>
</MethodReferenceExpression>
</Method>
</MethodInvokeExpression>
</Statements>
</MemberMethod>
</Members>
</TypeDeclaration>
</Types>
</Namespace>
</Namespaces>
</CompileUnit>
</CodeDomFile>
</TemplateFiles>
</Template>

0 comments on commit d0cd853

Please sign in to comment.