Skip to content

Instantly share code, notes, and snippets.

@mckn
Created December 12, 2011 19:45
Show Gist options
  • Save mckn/1468764 to your computer and use it in GitHub Desktop.
Save mckn/1468764 to your computer and use it in GitHub Desktop.
Example on how you could implement a @wip tag in specflow
namespace SpecFlow.Extensions
{
[Binding]
public class Tags
{
[AfterScenario("wip")]
public static void Wip()
{
if (ScenarioContext.Current.TestError == null || ScenarioContext.Current.TestError is SuccessException)
{
var message = @"Please remove the @wip tag from completed scenario: '{0}'";
throw new RemoveTagException(string.Format(message, ScenarioContext.Current.ScenarioInfo.Title));
}
}
}
public class RemoveTagException : Exception
{
public RemoveTagException(string message) : base(message)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment