Search in sources :

Example 1 with AuthenticationPolicy

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

the class OrganizationSteps method createOrganizationWithName.

@Given("an organization named $orgNames")
@Alias("organizations named $orgNames")
public void createOrganizationWithName(List<String> orgNames) {
    for (String orgName : orgNames) {
        Organization org = new Organization();
        org.setName(orgName);
        org.setAuthenticationPolicy(new AuthenticationPolicy());
        organizationDao.persist(org);
    }
}
Also used : Organization(org.jbehave.example.spring.security.domain.Organization) AuthenticationPolicy(org.jbehave.example.spring.security.domain.AuthenticationPolicy) Alias(org.jbehave.core.annotations.Alias) Given(org.jbehave.core.annotations.Given)

Example 2 with AuthenticationPolicy

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

the class OrganizationSteps method updateOrganizationWithDefaultAuthPolicy.

@Given("a default authentication policy for $orgName")
public void updateOrganizationWithDefaultAuthPolicy(String orgName) {
    Organization org = organizationDao.findByName(orgName);
    org.setAuthenticationPolicy(new AuthenticationPolicy());
    organizationDao.persist(org);
}
Also used : Organization(org.jbehave.example.spring.security.domain.Organization) AuthenticationPolicy(org.jbehave.example.spring.security.domain.AuthenticationPolicy) Given(org.jbehave.core.annotations.Given)

Aggregations

Given (org.jbehave.core.annotations.Given)2 AuthenticationPolicy (org.jbehave.example.spring.security.domain.AuthenticationPolicy)2 Organization (org.jbehave.example.spring.security.domain.Organization)2 Alias (org.jbehave.core.annotations.Alias)1