Search in sources :

Example 61 with Resource

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

the class AttributesManagerEntryIntegrationTest method getResourceRequiredHostAttributesWhenResourceNotExists.

@Test(expected = ResourceNotExistsException.class)
public void getResourceRequiredHostAttributesWhenResourceNotExists() throws Exception {
    System.out.println(CLASS_NAME + "getResourceRequiredHostAttributesWhenResourceNotExists");
    host = setUpHost().get(0);
    attributesManager.getResourceRequiredAttributes(sess, new Resource(), host);
// shouldn't find resource
}
Also used : Resource(cz.metacentrum.perun.core.api.Resource) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Example 62 with Resource

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

the class AttributesManagerEntryIntegrationTest method getRequiredMemberResourceAttributesFromOneServiceWorkWithUserWhenResourceNotExists.

@Test(expected = ResourceNotExistsException.class)
public void getRequiredMemberResourceAttributesFromOneServiceWorkWithUserWhenResourceNotExists() throws Exception {
    System.out.println(CLASS_NAME + "getRequiredMemberResourceAttributesFromOneServiceWorkWithUserWhenResourceNotExists");
    service = setUpService();
    vo = setUpVo();
    member = setUpMember();
    attributesManager.getRequiredAttributes(sess, service, new Resource(), member, true);
// shouldn't find resource
}
Also used : Resource(cz.metacentrum.perun.core.api.Resource) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Example 63 with Resource

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

the class AttributesManagerEntryIntegrationTest method getResourceAttributeWhenResourceNotExists.

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

Example 64 with Resource

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

the class AttributesManagerEntryIntegrationTest method getGroupResourceAttributesWhenResourceNotExists.

@Test(expected = ResourceNotExistsException.class)
public void getGroupResourceAttributesWhenResourceNotExists() throws Exception {
    System.out.println(CLASS_NAME + "getGroupResourceAttributesWhenResourceNotExists");
    vo = setUpVo();
    group = setUpGroup();
    attributesManager.getAttributes(sess, new Resource(), group);
// shouldn't find resource
}
Also used : Resource(cz.metacentrum.perun.core.api.Resource) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Example 65 with Resource

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

the class AttributesManagerEntryIntegrationTest method getResourceRequiredMemberResourceAttributesWhenResourceNotExists.

@Test(expected = ResourceNotExistsException.class)
public void getResourceRequiredMemberResourceAttributesWhenResourceNotExists() throws Exception {
    System.out.println(CLASS_NAME + "getResourceRequiredMemberResourceAttributesWhenResourceNotExists");
    vo = setUpVo();
    member = setUpMember();
    facility = setUpFacility();
    resource = setUpResource();
    attributesManager.getResourceRequiredAttributes(sess, new Resource(), resource, member);
// shouldn't find resource
}
Also used : Resource(cz.metacentrum.perun.core.api.Resource) AbstractPerunIntegrationTest(cz.metacentrum.perun.core.AbstractPerunIntegrationTest) Test(org.junit.Test)

Aggregations

Resource (cz.metacentrum.perun.core.api.Resource)176 Test (org.junit.Test)110 Attribute (cz.metacentrum.perun.core.api.Attribute)82 AbstractPerunIntegrationTest (cz.metacentrum.perun.core.AbstractPerunIntegrationTest)79 Facility (cz.metacentrum.perun.core.api.Facility)56 User (cz.metacentrum.perun.core.api.User)55 Group (cz.metacentrum.perun.core.api.Group)49 ArrayList (java.util.ArrayList)41 Vo (cz.metacentrum.perun.core.api.Vo)31 Member (cz.metacentrum.perun.core.api.Member)29 PerunSession (cz.metacentrum.perun.core.api.PerunSession)29 AttributeNotExistsException (cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException)26 RichResource (cz.metacentrum.perun.core.api.RichResource)25 InternalErrorException (cz.metacentrum.perun.core.api.exceptions.InternalErrorException)20 RichUser (cz.metacentrum.perun.core.api.RichUser)18 ConsistencyErrorException (cz.metacentrum.perun.core.api.exceptions.ConsistencyErrorException)18 ContactGroup (cz.metacentrum.perun.core.api.ContactGroup)17 RichAttribute (cz.metacentrum.perun.core.api.RichAttribute)17 BanOnFacility (cz.metacentrum.perun.core.api.BanOnFacility)15 WrongReferenceAttributeValueException (cz.metacentrum.perun.core.api.exceptions.WrongReferenceAttributeValueException)14