package com.codecheck123.dumb_bdd;

import java.util.ArrayList;
import java.util.List;

public class Given extends AbstractBDD {

	private final UserStory userStory;
	private final List<String> given = new ArrayList<String>();;
	
	Given(UserStory userStory, String bddExpression){
		this.userStory = userStory;
		given.add(bddExpression);
	}

	UserStory getUserStory() {
		return userStory;
	}

	List<String> getAll() {
		return given;
	}
	
	public Given and(String bddExpression, ExpressionRunner runner){
		given.add(bddExpression);
		buildArgs(bddExpression,runner);
		return this;
	}
	
	public When when(String bddExpression, ExpressionRunner runner){
		buildArgs(bddExpression,runner);
		return new When(this,bddExpression);
	}
}
@@ -271,19 +271,44 @@
 pression
+, ExpressionRunner runner
 )%7B%0A
-
 %09%09this.u
@@ -357,16 +357,60 @@
 ssion);%0A
+%09%09evaluateExpression(bddExpression,runner);%0A
 %09%7D%0A%0A%09Use
@@ -599,25 +599,34 @@
 ion);%0A%09%09
-buildArgs
+evaluateExpression
 (bddExpr
@@ -733,17 +733,26 @@
 %7B%0A%09%09
-buildArgs
+evaluateExpression
 (bdd

evaluate expression