use of org.simbasecurity.core.domain.PolicyEntity in project simba-os by cegeka.
the class RuleDatabaseRepositoryTest method setUp.
@Before
public void setUp() {
UserEntity user = new UserEntity(USER_NAME);
RoleEntity role = new RoleEntity(ROLE_NAME);
policy = new PolicyEntity(POLICY_NAME);
resourceRuleEntity = new ResourceRuleEntity(RESOURCE_RULE_NAME);
resourceRuleEntity.setResourceName(RESOURCE_NAME);
urlRuleEntity = new URLRuleEntity("urlrule");
persistAndRefresh(user, role, policy, resourceRuleEntity, urlRuleEntity);
policy.addRule(resourceRuleEntity);
policy.addRule(urlRuleEntity);
role.addPolicy(policy);
user.addRole(role);
}
Aggregations