Search in sources :

Example 1 with MembersManager

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

the class VosManagerEntryIntegrationTest method createMemberFromExtSource.

// private methods ------------------------------------------------------------------
private Member createMemberFromExtSource(final Vo createdVo) throws Exception {
    //This is obsolete approach which is dependent on extSource, remove these lines in future...
    //addExtSourceDelegate(createdVo);
    //final List<Candidate> candidates = vosManagerEntry.findCandidates(sess,
    //		createdVo, "kouril", 1);
    final Candidate candidate = prepareCandidate();
    final MembersManager membersManagerEntry = perun.getMembersManager();
    //candidates.get(0));
    final Member member = perun.getMembersManagerBl().createMemberSync(sess, createdVo, candidate);
    assertNotNull("No member created", member);
    usersForDeletion.add(perun.getUsersManager().getUserByMember(sess, member));
    // save user for deletion after test
    return member;
}
Also used : Candidate(cz.metacentrum.perun.core.api.Candidate) MembersManager(cz.metacentrum.perun.core.api.MembersManager) Member(cz.metacentrum.perun.core.api.Member)

Aggregations

Candidate (cz.metacentrum.perun.core.api.Candidate)1 Member (cz.metacentrum.perun.core.api.Member)1 MembersManager (cz.metacentrum.perun.core.api.MembersManager)1