Search in sources :

Example 1 with UserBuilder

use of org.jbehave.example.spring.security.domain.UserBuilder in project jbehave-core by jbehave.

the class UserSteps method createUsersFromTable.

@Given("the users for $orgName: $userTable")
public void createUsersFromTable(String orgName, ExamplesTable table) {
    Organization org = organizationDao.findByName(orgName);
    List<Parameters> parametersList = table.getRowsAsParameters(true);
    for (Parameters parameters : parametersList) {
        userDao.persist(new UserBuilder(org, parameters, table.getHeaders()).build());
    }
}
Also used : Organization(org.jbehave.example.spring.security.domain.Organization) Parameters(org.jbehave.core.steps.Parameters) UserBuilder(org.jbehave.example.spring.security.domain.UserBuilder) Given(org.jbehave.core.annotations.Given)

Aggregations

Given (org.jbehave.core.annotations.Given)1 Parameters (org.jbehave.core.steps.Parameters)1 Organization (org.jbehave.example.spring.security.domain.Organization)1 UserBuilder (org.jbehave.example.spring.security.domain.UserBuilder)1