Skip to content

AutoMockingSpecification

amirci edited this page Dec 23, 2010 · 1 revision

The AutoMockingSpecification class is the base class for all specifications.

    public abstract class AutoMockSpecification<TSut, TContract>
        : AutoMockBaseTest<TSut, TContract> where TSut : class, TContract
    { ... }

It provides all the benefits of AutoMockBaseTest plus the addition of enforcing Given When Then.

Benefits

The class enforces the given, when then by providing placeholders to facilitate how to write a test:

        protected virtual void GivenThat() {}

        protected virtual void AndGivenThatAfterCreated() {}

        protected virtual void WhenIRun() { ... }

        protected virtual void AndThenCleanUp() {}

Clone this wiki locally