public GivenGrammar Given(string description, Action <SpecificationContext> implementation) { var given = new GivenGrammar(Context, description, implementation, GivenGrammarPrefix.Given); given.Evaluate(); return(given); }
public static GivenGrammar And(this GivenGrammar givenGrammar, string description, Action <SpecificationContext> implementation) { var andGivenGrammar = new GivenGrammar(givenGrammar.Context, description, implementation, GivenGrammarPrefix.And); andGivenGrammar.Evaluate(); return(andGivenGrammar); }
public static WhenGrammar When(this GivenGrammar givenGrammar, string description, Action <SpecificationContext> implementation) { var whenGrammar = new WhenGrammar(givenGrammar.Context, description, implementation, WhenGrammarPrefix.When); whenGrammar.Evaluate(); return(whenGrammar); }
public static ThenGrammar Then(this GivenGrammar givenGrammar, string description, Func <SpecificationContext, bool> implementation) { var thenGrammar = new ThenGrammar(givenGrammar.Context, description, implementation, ThenGrammarPrefix.Then); thenGrammar.Evaluate(); return(thenGrammar); }
public static GivenGrammar And(this GivenGrammar givenGrammar, string description) { return(And(givenGrammar, description, null)); }
public static WhenGrammar When(this GivenGrammar givenGrammar, string description) { return(When(givenGrammar, description, null)); }