-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using TechTalk.SpecFlow; | ||
|
||
namespace $rootnamespace$ | ||
{ | ||
[Binding] | ||
public sealed class $safeitemname$ | ||
{ | ||
// For additional details on SpecFlow hooks see http://go.specflow.org/doc-hooks | ||
|
||
[BeforeScenario("@tag1")] | ||
public void BeforeScenarioWithTag() | ||
{ | ||
// Example of filtering hooks using tags. (in this case, this 'before scenario' hook will execute if the feature/scenario contains the tag '@tag1') | ||
// See https://docs.specflow.org/projects/specflow/en/latest/Bindings/Hooks.html?highlight=hooks#tag-scoping | ||
|
||
//TODO: implement logic that has to run before executing each scenario | ||
} | ||
|
||
[BeforeScenario(Order = 1)] | ||
public void FirstBeforeScenario() | ||
{ | ||
// Example of ordering the execution of hooks | ||
// See https://docs.specflow.org/projects/specflow/en/latest/Bindings/Hooks.html?highlight=order#hook-execution-order | ||
|
||
//TODO: implement logic that has to run before executing each scenario | ||
} | ||
|
||
[AfterScenario] | ||
public void AfterScenario() | ||
{ | ||
//TODO: implement logic that has to run after executing each scenario | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
SpecFlow.VisualStudio.ItemTemplates/Hooks/Hooks_CSharp.vstemplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item"> | ||
<TemplateData> | ||
<DefaultName>Hooks.cs</DefaultName> | ||
<Name>SpecFlow Hooks (event bindings)</Name> | ||
<Description>SpecFlow Hooks (event bindings)</Description> | ||
<ProjectType>CSharp</ProjectType> | ||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp> | ||
<SortOrder>10</SortOrder> | ||
<Icon>SpecFlowIcon.ico</Icon> | ||
</TemplateData> | ||
<TemplateContent> | ||
<ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">Hooks1.cs</ProjectItem> | ||
</TemplateContent> | ||
</VSTemplate> |
14 changes: 14 additions & 0 deletions
14
SpecFlow.VisualStudio.ItemTemplates/Hooks/Hooks_VB.vstemplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item"> | ||
<TemplateData> | ||
<DefaultName>Hooks.cs</DefaultName> | ||
<Name>SpecFlow Hooks (event bindings)</Name> | ||
<Description>SpecFlow Hooks (event bindings)</Description> | ||
<ProjectType>VisualBasic</ProjectType> | ||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp> | ||
<SortOrder>10</SortOrder> | ||
<Icon>SpecFlowIcon.ico</Icon> | ||
</TemplateData> | ||
<TemplateContent> | ||
<ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">Hooks1.cs</ProjectItem> | ||
</TemplateContent> | ||
</VSTemplate> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters