Search in sources :

Example 11 with Facility

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

the class AttributesManagerEntryIntegrationTest method removeAllFacilityAttributesWhenFacilityNotExists.

@Test(expected = FacilityNotExistsException.class)
public void removeAllFacilityAttributesWhenFacilityNotExists() throws Exception {
    System.out.println(CLASS_NAME + "removeAllFacilityAttributesWhenFacilityNotExists");
    attributesManager.removeAllAttributes(sess, new Facility());
// shouldn't find facility
}
Also used : Facility(cz.metacentrum.perun.core.api.Facility) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Example 12 with Facility

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

the class AttributesManagerEntryIntegrationTest method getFacilityAttributeWhenFacilityNotExists.

@Test(expected = FacilityNotExistsException.class)
public void getFacilityAttributeWhenFacilityNotExists() throws Exception {
    System.out.println(CLASS_NAME + "getFacilityAttributeWhenFacilityNotExists");
    attributesManager.getAttribute(sess, new Facility(), "urn:perun:facility:attribute-def:core:id");
// shouldn't find facility
}
Also used : Facility(cz.metacentrum.perun.core.api.Facility) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Example 13 with Facility

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

the class AttributesManagerEntryIntegrationTest method getFacilityAttributesWhenFacilityNotExists.

@Test(expected = FacilityNotExistsException.class)
public void getFacilityAttributesWhenFacilityNotExists() throws Exception {
    System.out.println(CLASS_NAME + "getFacilityAttributesWhenFacilityNotExists");
    attributesManager.getAttributes(sess, new Facility());
// shouldn't find facility
}
Also used : Facility(cz.metacentrum.perun.core.api.Facility) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Example 14 with Facility

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

the class AttributesManagerEntryIntegrationTest method removeFacilityAttributesWhenFacilityNotExists.

@Test(expected = FacilityNotExistsException.class)
public void removeFacilityAttributesWhenFacilityNotExists() throws Exception {
    System.out.println(CLASS_NAME + "removeFacilityAttributesWhenFacilityNotExists");
    attributes = setUpFacilityAttribute();
    attributesManager.removeAttributes(sess, new Facility(), attributes);
// shouldn't find facility
}
Also used : Facility(cz.metacentrum.perun.core.api.Facility) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Example 15 with Facility

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

the class AttributesManagerEntryIntegrationTest method removeAllFacilityUserAttributesWhenFacilityNotExists.

@Test(expected = FacilityNotExistsException.class)
public void removeAllFacilityUserAttributesWhenFacilityNotExists() throws Exception {
    System.out.println(CLASS_NAME + "removeAllFacilityUserAttributesWhenFacilityNotExists");
    vo = setUpVo();
    member = setUpMember();
    User user = perun.getUsersManager().getUserByMember(sess, member);
    attributesManager.removeAllAttributes(sess, new Facility(), user);
// shouldn't find facility
}
Also used : User(cz.metacentrum.perun.core.api.User) Facility(cz.metacentrum.perun.core.api.Facility) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Aggregations

Facility (cz.metacentrum.perun.core.api.Facility)188 Test (org.junit.Test)95 User (cz.metacentrum.perun.core.api.User)81 Attribute (cz.metacentrum.perun.core.api.Attribute)75 AbstractPerunIntegrationTest (cz.metacentrum.perun.core.AbstractPerunIntegrationTest)61 Resource (cz.metacentrum.perun.core.api.Resource)52 BanOnFacility (cz.metacentrum.perun.core.api.BanOnFacility)51 ArrayList (java.util.ArrayList)48 Group (cz.metacentrum.perun.core.api.Group)24 InternalErrorException (cz.metacentrum.perun.core.api.exceptions.InternalErrorException)23 Member (cz.metacentrum.perun.core.api.Member)22 PerunSession (cz.metacentrum.perun.core.api.PerunSession)20 RichFacility (cz.metacentrum.perun.core.api.RichFacility)20 Host (cz.metacentrum.perun.core.api.Host)19 PrivilegeException (cz.metacentrum.perun.core.api.exceptions.PrivilegeException)18 AttributeNotExistsException (cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException)17 RichUser (cz.metacentrum.perun.core.api.RichUser)16 WrongAttributeValueException (cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException)15 WrongAttributeAssignmentException (cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException)14 Vo (cz.metacentrum.perun.core.api.Vo)13