use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testCreateSecurityTeam.
@Test
public void testCreateSecurityTeam() throws Exception {
System.out.println(CLASS_NAME + "testCreateSecurityTeam");
SecurityTeam expected = new SecurityTeam("Name", "Desc");
SecurityTeam actual = securityTeamsManagerEntry.createSecurityTeam(sess, expected);
assertNotNull(actual);
assertEquals(expected, actual);
actual = securityTeamsManagerEntry.getSecurityTeamById(sess, actual.getId());
assertNotNull(actual);
assertEquals(expected, actual);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testAddGroupAsAdminSecurityTeamNotExists.
@Test(expected = SecurityTeamNotExistsException.class)
public void testAddGroupAsAdminSecurityTeamNotExists() throws Exception {
System.out.println(CLASS_NAME + "testAddGroupAsAdminSecurityTeamNotExists");
setUpUsers();
Group group = setUpGroup(u0, u1);
SecurityTeam st = new SecurityTeam(0, "Name", "Desc");
securityTeamsManagerEntry.addAdmin(sess, st, group);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testUpdateSecurityTeamWithoutName.
@Test(expected = InternalErrorException.class)
public void testUpdateSecurityTeamWithoutName() throws Exception {
System.out.println(CLASS_NAME + "testUpdateSecurityTeamWithoutName");
List<SecurityTeam> teams = setUpSecurityTeams();
SecurityTeam expected = teams.get(0);
expected.setName(null);
securityTeamsManagerEntry.updateSecurityTeam(sess, expected);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testUpdateSecurityTeamWithNoName.
@Test(expected = SecurityTeamNotExistsException.class)
public void testUpdateSecurityTeamWithNoName() throws Exception {
System.out.println(CLASS_NAME + "testUpdateSecurityTeamWithNoName");
SecurityTeam expected = new SecurityTeam("ToUpdate", "Desc");
securityTeamsManagerEntry.updateSecurityTeam(sess, expected);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testAddAdminSecurityTeamNotExists.
@Test(expected = SecurityTeamNotExistsException.class)
public void testAddAdminSecurityTeamNotExists() throws Exception {
System.out.println(CLASS_NAME + "testAddAdminSecurityTeamNotExists");
setUpUsers();
SecurityTeam st = new SecurityTeam(0, "Name", "Desc");
securityTeamsManagerEntry.addAdmin(sess, st, u0);
}
Aggregations