Skip to content

Instantly share code, notes, and snippets.

@jfoshee
Last active August 22, 2024 17:57
Show Gist options
  • Select an option

  • Save jfoshee/b61ddda48afc2220f6c6f4a98b61b07a to your computer and use it in GitHub Desktop.

Select an option

Save jfoshee/b61ddda48afc2220f6c6f4a98b61b07a to your computer and use it in GitHub Desktop.

Revisions

  1. jfoshee revised this gist Aug 22, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions SkipHook.cs
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    using TechTalk.SpecFlow;
    using Xunit;

    namespace Example.SpecFlowTests.Hooks;

  2. jfoshee revised this gist Aug 22, 2024. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions SkipHook.cs
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@
    #pragma warning disable CA1822 // Mark members as static
    using TechTalk.SpecFlow;

    namespace Example.SpecFlowTests.Hooks;
    @@ -7,7 +6,7 @@ namespace Example.SpecFlowTests.Hooks;
    public class SkipHook
    {
    [BeforeScenario(tags: "skip")]
    public void BeforeScenario()
    public static void BeforeScenario()
    {
    Skip.If(true, "Scenario is tagged @skip");
    }
  3. jfoshee created this gist Aug 22, 2024.
    14 changes: 14 additions & 0 deletions SkipHook.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #pragma warning disable CA1822 // Mark members as static
    using TechTalk.SpecFlow;

    namespace Example.SpecFlowTests.Hooks;

    [Binding]
    public class SkipHook
    {
    [BeforeScenario(tags: "skip")]
    public void BeforeScenario()
    {
    Skip.If(true, "Scenario is tagged @skip");
    }
    }