1 package autotest.tko; 2 3 import com.google.gwt.json.client.JSONObject; 4 import com.google.gwt.json.client.JSONString; 5 6 public abstract class TestSet { 7 /** 8 * Get the full condition args for this test set. 9 */ getInitialCondition()10 public abstract JSONObject getInitialCondition(); 11 /** 12 * Get the SQL condition for this test set within the global set. 13 */ getPartialSqlCondition()14 public abstract String getPartialSqlCondition(); isSingleTest()15 public abstract boolean isSingleTest(); getTestIndex()16 public abstract int getTestIndex(); 17 getCondition()18 public JSONObject getCondition() { 19 JSONObject condition = getInitialCondition(); 20 String sqlCondition = TkoUtils.getSqlCondition(condition); 21 sqlCondition = TkoUtils.joinWithParens(" AND ", sqlCondition, getPartialSqlCondition()); 22 condition.put("extra_where", new JSONString(sqlCondition)); 23 return condition; 24 } 25 } 26