private void addOnlineSteps(int amount, Scenario currentScenario) { for (int i = 0; i < amount; i++) { IEvent toUse = generatedEvents.ElementAt(currentEvent); currentEvent++; currentScenario.addOnlineReplayStep(new OnlineReplayStep(toUse)); scenariolength++; totalEvents++; } }
public Scenario generateRandomScenario(int length) { // Need to times the length of the replayevents because offline steps contain 2 events. generatedEvents = eventGenerator.generateRandomEvents(length * 2); Scenario generatedScenario = new Scenario(); while (totalEvents < (length - 1)) { addRandomReplaySteps(generatedScenario); } // Add a final online event to make the scenario commit its last offline events. generatedScenario.addOnlineReplayStep(new OnlineReplayStep(new ListNameChanged("Final List"))); return generatedScenario; }