Search in sources :

Example 26 with PerunPrincipal

use of cz.metacentrum.perun.core.api.PerunPrincipal in project perun by CESNET.

the class urn_perun_member_group_attribute_def_virt_isGroupAdminTest method setUp.

@Before
public void setUp() throws Exception {
    classInstance = new urn_perun_member_group_attribute_def_virt_isGroupAdmin();
    usersManager = perun.getUsersManager();
    vosManager = perun.getVosManager();
    membersManager = perun.getMembersManager();
    groupsManager = perun.getGroupsManager();
    final PerunPrincipal pp = new PerunPrincipal("perunTests", ExtSourcesManager.EXTSOURCE_NAME_INTERNAL, ExtSourcesManager.EXTSOURCE_INTERNAL);
    this.session = new PerunSessionImpl(perun, pp, new PerunClient());
    this.attrDef = classInstance.getAttributeDefinition();
    this.attribute = new Attribute(attrDef);
    this.user = setUpUser();
    this.vo = setUpVo();
    this.member = setUpMember(vo);
    this.group = setUpGroup(vo, member);
}
Also used : Attribute(cz.metacentrum.perun.core.api.Attribute) PerunClient(cz.metacentrum.perun.core.api.PerunClient) PerunPrincipal(cz.metacentrum.perun.core.api.PerunPrincipal) PerunSessionImpl(cz.metacentrum.perun.core.impl.PerunSessionImpl) Before(org.junit.Before)

Example 27 with PerunPrincipal

use of cz.metacentrum.perun.core.api.PerunPrincipal in project perun by CESNET.

the class AbstractTest method setUpSess.

@Before
public void setUpSess() throws Exception {
    final PerunPrincipal pp = new PerunPrincipal("perunTests", ExtSourcesManager.EXTSOURCE_NAME_INTERNAL, ExtSourcesManager.EXTSOURCE_INTERNAL);
    sess = perun.getPerunSession(pp, new PerunClient());
}
Also used : PerunClient(cz.metacentrum.perun.core.api.PerunClient) PerunPrincipal(cz.metacentrum.perun.core.api.PerunPrincipal)

Aggregations

PerunPrincipal (cz.metacentrum.perun.core.api.PerunPrincipal)27 PerunClient (cz.metacentrum.perun.core.api.PerunClient)24 Before (org.junit.Before)13 InternalErrorException (cz.metacentrum.perun.core.api.exceptions.InternalErrorException)10 Facility (cz.metacentrum.perun.core.api.Facility)8 Service (cz.metacentrum.perun.core.api.Service)8 Vo (cz.metacentrum.perun.core.api.Vo)8 Group (cz.metacentrum.perun.core.api.Group)7 Resource (cz.metacentrum.perun.core.api.Resource)7 ArrayList (java.util.ArrayList)6 AttributeDefinition (cz.metacentrum.perun.core.api.AttributeDefinition)5 PerunSession (cz.metacentrum.perun.core.api.PerunSession)5 User (cz.metacentrum.perun.core.api.User)5 UserNotExistsException (cz.metacentrum.perun.core.api.exceptions.UserNotExistsException)5 JdbcPerunTemplate (org.springframework.jdbc.core.JdbcPerunTemplate)5 Owner (cz.metacentrum.perun.core.api.Owner)4 ExecService (cz.metacentrum.perun.taskslib.model.ExecService)4 HashMap (java.util.HashMap)4 Attribute (cz.metacentrum.perun.core.api.Attribute)3 Candidate (cz.metacentrum.perun.core.api.Candidate)3