Search in sources :

Example 31 with Facility

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

the class urn_perun_facility_attribute_def_def_homeMountPointsTest method testCheckAttributeValueNoHomeMountPointsSet.

@Test(expected = WrongAttributeValueException.class)
public void testCheckAttributeValueNoHomeMountPointsSet() throws Exception {
    System.out.println("testCheckAttributeValueNoHomeMountPointsSet()");
    attribute.setValue(new ArrayList<String>());
    classInstance.checkAttributeValue(session, new Facility(), attribute);
}
Also used : Facility(cz.metacentrum.perun.core.api.Facility) Test(org.junit.Test)

Example 32 with Facility

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

the class urn_perun_facility_attribute_def_def_ldapBaseDNTest method testCheckAttributeValueWrongChars.

@Test(expected = WrongAttributeValueException.class)
public void testCheckAttributeValueWrongChars() throws Exception {
    Attribute attribute = new Attribute(module.getAttributeDefinition());
    attribute.setValue("cn=example,dc=domain");
    module.checkAttributeValue(null, new Facility(), attribute);
}
Also used : Attribute(cz.metacentrum.perun.core.api.Attribute) Facility(cz.metacentrum.perun.core.api.Facility) Test(org.junit.Test)

Example 33 with Facility

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

the class urn_perun_facility_attribute_def_def_ldapBaseDNTest method testCheckAttributeValueFailsLessChars.

@Test(expected = WrongAttributeValueException.class)
public void testCheckAttributeValueFailsLessChars() throws Exception {
    Attribute attribute = new Attribute(module.getAttributeDefinition());
    attribute.setValue("ou");
    module.checkAttributeValue(null, new Facility(), attribute);
}
Also used : Attribute(cz.metacentrum.perun.core.api.Attribute) Facility(cz.metacentrum.perun.core.api.Facility) Test(org.junit.Test)

Example 34 with Facility

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

the class urn_perun_facility_attribute_def_def_shellsTest method testCheckAttributeValueNoShellsSet.

@Test(expected = WrongAttributeValueException.class)
public void testCheckAttributeValueNoShellsSet() throws Exception {
    System.out.println("testCheckAttributeValueNoShellsSet()");
    attribute.setValue(new ArrayList<String>());
    classInstance.checkAttributeValue(session, new Facility(), attribute);
}
Also used : Matchers.anyString(org.mockito.Matchers.anyString) Facility(cz.metacentrum.perun.core.api.Facility) Test(org.junit.Test)

Example 35 with Facility

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

the class urn_perun_group_resource_attribute_def_def_isUnixGroupIntegrationtest method setUpFacility.

private Facility setUpFacility() throws Exception {
    Facility facility = new Facility();
    facility.setName("IsUnixGroupTestFacility");
    facility = perun.getFacilitiesManager().createFacility(sess, facility);
    return facility;
}
Also used : Facility(cz.metacentrum.perun.core.api.Facility)

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