コード例 #1
0
        public GivenGrammar Given(string description, Action <SpecificationContext> implementation)
        {
            var given = new GivenGrammar(Context, description, implementation, GivenGrammarPrefix.Given);

            given.Evaluate();
            return(given);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public static GivenGrammar And(this GivenGrammar givenGrammar, string description)
 {
     return(And(givenGrammar, description, null));
 }
コード例 #6
0
 public static WhenGrammar When(this GivenGrammar givenGrammar, string description)
 {
     return(When(givenGrammar, description, null));
 }