LSTANCZYK
10/17/2014 - 2:53 PM

WhenGivenAttribute.cs

namespace StepDefinitions
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Reflection;

    using TechTalk.SpecFlow;
    using TechTalk.SpecFlow.Assist;
    using TechTalk.SpecFlow.Bindings;

    /// <summary>
    /// Specifies a step definition primarily for 'When' steps that matches for the provided regular expression, but allows re-use in 'Given' steps as well.
    /// </summary>
    public class WhenGivenAttribute : StepDefinitionBaseAttribute
    {
        public WhenGivenAttribute()
            : this(null)
        {
        }

        public WhenGivenAttribute(string regex)
            : base(regex, new[] { StepDefinitionType.Given, StepDefinitionType.When })
        {
        }
    }
}