use of cz.metacentrum.perun.core.api.Resource in project perun by CESNET.
the class AttributesManagerEntryIntegrationTest method setMemberResourceAttributeWhenResourceNotExists.
@Test(expected = ResourceNotExistsException.class)
public void setMemberResourceAttributeWhenResourceNotExists() throws Exception {
System.out.println(CLASS_NAME + "setMemberResourceAttributeWhenResourceNotExists");
vo = setUpVo();
member = setUpMember();
attributes = setUpMemberResourceAttribute();
attributesManager.setAttribute(sess, new Resource(), member, attributes.get(0));
// shouldn't find resource
}
use of cz.metacentrum.perun.core.api.Resource in project perun by CESNET.
the class AttributesManagerEntryIntegrationTest method getRequiredMemberResourceAttributesFromOneServiceWhenResourceNotExists.
@Test(expected = ResourceNotExistsException.class)
public void getRequiredMemberResourceAttributesFromOneServiceWhenResourceNotExists() throws Exception {
System.out.println(CLASS_NAME + "getRequiredMemberResourceAttributesFromOneServiceWhenResourceNotExists");
service = setUpService();
vo = setUpVo();
member = setUpMember();
attributesManager.getRequiredAttributes(sess, service, new Resource(), member);
// shouldn't find resource
}
use of cz.metacentrum.perun.core.api.Resource in project perun by CESNET.
the class AttributesManagerEntryIntegrationTest method getResourceRequiredMemberResourceAttributesWorkWithUserWhenSecondResourceNotExists.
@Test(expected = ResourceNotExistsException.class)
public void getResourceRequiredMemberResourceAttributesWorkWithUserWhenSecondResourceNotExists() throws Exception {
System.out.println(CLASS_NAME + "getResourceRequiredMemberResourceAttributesWorkWithUserWhenSecondResourceNotExists");
vo = setUpVo();
member = setUpMember();
facility = setUpFacility();
resource = setUpResource();
attributesManager.getResourceRequiredAttributes(sess, resource, new Resource(), member, true);
// shouldn't find resource
}
use of cz.metacentrum.perun.core.api.Resource in project perun by CESNET.
the class AttributesManagerEntryIntegrationTest method getResourceRequiredGroupResourceAttributesWhenSecondResourceNotExists.
@Test(expected = ResourceNotExistsException.class)
public void getResourceRequiredGroupResourceAttributesWhenSecondResourceNotExists() throws Exception {
System.out.println(CLASS_NAME + "getResourceRequiredGroupResourceAttributesWhenSecondResourceNotExists");
vo = setUpVo();
group = setUpGroup();
facility = setUpFacility();
resource = setUpResource();
attributesManager.getResourceRequiredAttributes(sess, resource, new Resource(), group);
// shouldn't find resource
}
use of cz.metacentrum.perun.core.api.Resource in project perun by CESNET.
the class AttributesManagerEntryIntegrationTest method getGroupResourceAttributeByIdWhenResourceNotExists.
@Test(expected = ResourceNotExistsException.class)
public void getGroupResourceAttributeByIdWhenResourceNotExists() throws Exception {
System.out.println(CLASS_NAME + "getGroupResourceAttributeByIdWhenResourceNotExists");
vo = setUpVo();
group = setUpGroup();
attributes = setUpGroupResourceAttribute();
int id = attributes.get(0).getId();
attributesManager.getAttributeById(sess, new Resource(), group, id);
// shouldn't find group
}
Aggregations