use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testRemoveAdminSecurityTeamNotExists.
@Test(expected = SecurityTeamNotExistsException.class)
public void testRemoveAdminSecurityTeamNotExists() throws Exception {
System.out.println(CLASS_NAME + "testRemoveAdminSecurityTeamNotExists");
setUpUsers();
SecurityTeam st = new SecurityTeam(0, "Name", "Desc");
securityTeamsManagerEntry.removeAdmin(sess, st, u1);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testCreateSecurityTeamWithoutDsc.
@Test
public void testCreateSecurityTeamWithoutDsc() throws Exception {
System.out.println(CLASS_NAME + "testCreateSecurityTeamWithoutDsc");
SecurityTeam expected = new SecurityTeam("Name", null);
SecurityTeam actual = securityTeamsManagerEntry.createSecurityTeam(sess, expected);
assertNotNull(actual);
assertEquals(expected, actual);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testCreateSecurityTeamAlreadyExists.
@Test(expected = SecurityTeamExistsException.class)
public void testCreateSecurityTeamAlreadyExists() throws Exception {
System.out.println(CLASS_NAME + "testCreateSecurityTeamAlreadyExists");
SecurityTeam expected = new SecurityTeam("Name", "Desc");
securityTeamsManagerEntry.createSecurityTeam(sess, expected);
SecurityTeam actual = securityTeamsManagerEntry.createSecurityTeam(sess, expected);
assertNotNull(actual);
assertEquals(expected, actual);
securityTeamsManagerEntry.createSecurityTeam(sess, actual);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testCreateSecurityTeamWithoutName.
@Test(expected = InternalErrorException.class)
public void testCreateSecurityTeamWithoutName() throws Exception {
System.out.println(CLASS_NAME + "testCreateSecurityTeamWithoutName");
SecurityTeam expected = new SecurityTeam(null, "Desc");
securityTeamsManagerEntry.createSecurityTeam(sess, expected);
}
use of cz.metacentrum.perun.core.api.SecurityTeam in project perun by CESNET.
the class SecurityTeamsManagerEntryIntegrationTest method testDeleteSecurityTeamBeanNotExists.
@Test(expected = SecurityTeamNotExistsException.class)
public void testDeleteSecurityTeamBeanNotExists() throws Exception {
System.out.println(CLASS_NAME + "testDeleteSecurityTeamBeanNotExists");
st0 = new SecurityTeam("Name", "Desc");
st0.setId(10);
securityTeamsManagerEntry.deleteSecurityTeam(sess, st0);
}
Aggregations