TestingEventListener listener = null;
List<Populate> toPopulate = new ArrayList<Populate>();
for (Iterator iterator = scenario.globals.iterator(); iterator.hasNext();) {
final FactData fact = (FactData) iterator.next();
final Object f = eval("new " + getTypeName(resolver, fact) + "()");
toPopulate.add(new Populate() {
public void go() {
populateFields(fact, globalData, f);
}
});
globalData.put(fact.name, f);
wm.setGlobal(fact.name, f);
}
doPopulate(toPopulate);
for (Iterator<Fixture> iterator = scenario.fixtures.iterator(); iterator.hasNext();) {
Fixture fx = iterator.next();
if (fx instanceof FactData) {
//deal with facts and globals
final FactData fact = (FactData)fx;
final Object f = (fact.isModify)? this.populatedData.get(fact.name) : eval("new " + getTypeName(resolver, fact) + "()");
if (fact.isModify) {
if (!this.factHandles.containsKey(fact.name)) {
throw new IllegalArgumentException("Was not a previously inserted fact. [" + fact.name + "]");
}