use of org.activityinfo.test.capacity.model.ScenarioContext in project activityinfo by bedatadriven.
the class CapacityTest method addScenario.
private void addScenario(Scenario scenario) {
ScenarioContext scenarioContext = new ScenarioContext(context);
DevServerAccounts accounts = scenarioContext.getAccounts();
accounts.setBatchingEnabled(true);
for (UserRole user : scenario.getUsers()) {
UserAccount account = accounts.ensureAccountExists(user.getNickName());
LOGGER.fine(String.format("Created User: %s: %s", account.getEmail(), user.getNickName()));
}
accounts.flush();
scenarios.add(scenario);
}
Aggregations