feanz
10/31/2014 - 10:41 AM

BDD Style test base class for specifications, in Nunit

BDD Style test base class for specifications, in Nunit

    public abstract class Spec
    {
        [TestFixtureSetUp]
        public void Setup()
        {
            SpecSetup();

            Given();    

            When();
        }

        public virtual void SpecSetup()
        { }

        public abstract void Given();

        public abstract void When();
    }