use of cz.metacentrum.perun.core.bl.AttributesManagerBl in project perun by CESNET.
the class urn_perun_facility_attribute_def_def_uid_namespaceTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_facility_attribute_def_def_uid_namespace();
session = mock(PerunSessionImpl.class);
facility = new Facility();
attributeToCheck = new Attribute();
attributeToCheck.setFriendlyName("friendly_name");
reqAttribute = new Attribute();
PerunBl perunBl = mock(PerunBl.class);
when(session.getPerunBl()).thenReturn(perunBl);
AttributesManagerBl attributesManagerBl = mock(AttributesManagerBl.class);
when(perunBl.getAttributesManagerBl()).thenReturn(attributesManagerBl);
}
use of cz.metacentrum.perun.core.bl.AttributesManagerBl in project perun by CESNET.
the class urn_perun_facility_attribute_def_def_unixGroupName_namespaceTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_facility_attribute_def_def_unixGroupName_namespace();
session = mock(PerunSessionImpl.class);
facility = new Facility();
attributeToCheck = new Attribute();
attributeToCheck.setFriendlyName("friendly_name");
reqAttribute = new Attribute();
PerunBl perunBl = mock(PerunBl.class);
when(session.getPerunBl()).thenReturn(perunBl);
AttributesManagerBl attributesManagerBl = mock(AttributesManagerBl.class);
when(perunBl.getAttributesManagerBl()).thenReturn(attributesManagerBl);
}
use of cz.metacentrum.perun.core.bl.AttributesManagerBl in project perun by CESNET.
the class urn_perun_group_attribute_def_def_adName_o365muTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_group_attribute_def_def_adName_o365mu();
attributeToCheck = new Attribute();
sess = mock(PerunSessionImpl.class);
reqAttribute1 = new Attribute();
reqAttribute2 = new Attribute();
// perunBl
PerunBl perunBl = mock(PerunBl.class);
when(sess.getPerunBl()).thenReturn(perunBl);
// managers
attributesManagerBl = mock(AttributesManagerBl.class);
when(perunBl.getAttributesManagerBl()).thenReturn(attributesManagerBl);
resourcesManagerBl = mock(ResourcesManagerBl.class);
when(perunBl.getResourcesManagerBl()).thenReturn(resourcesManagerBl);
// specific methods
when(attributesManagerBl.getAttribute(sess, resource1, AttributesManager.NS_RESOURCE_ATTR_DEF + ":adOuName")).thenReturn(reqAttribute1);
when(attributesManagerBl.getAttribute(sess, resource2, AttributesManager.NS_RESOURCE_ATTR_DEF + ":adOuName")).thenReturn(reqAttribute2);
}
use of cz.metacentrum.perun.core.bl.AttributesManagerBl in project perun by CESNET.
the class urn_perun_group_attribute_def_def_flatGroupStructureEnabledTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_group_attribute_def_def_flatGroupStructureEnabled();
attributeToCheck = new Attribute(classInstance.getAttributeDefinition());
sess = mock(PerunSessionImpl.class);
PerunBl perunBl = mock(PerunBl.class);
attributesManagerBl = mock(AttributesManagerBl.class);
when(sess.getPerunBl()).thenReturn(perunBl);
when(perunBl.getAttributesManagerBl()).thenReturn(attributesManagerBl);
}
use of cz.metacentrum.perun.core.bl.AttributesManagerBl in project perun by CESNET.
the class urn_perun_group_attribute_def_def_groupStructureSynchronizationTimesTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_group_attribute_def_def_groupStructureSynchronizationTimes();
attributeToCheck = new Attribute(classInstance.getAttributeDefinition());
syncInterval = new Attribute(classInstance.getAttributeDefinition());
sess = mock(PerunSessionImpl.class);
PerunBl perunBl = mock(PerunBl.class);
when(sess.getPerunBl()).thenReturn(perunBl);
GroupsManagerBl groupsManagerBl = mock(GroupsManagerBl.class);
when(sess.getPerunBl().getGroupsManagerBl()).thenReturn(groupsManagerBl);
when(sess.getPerunBl().getGroupsManagerBl().isGroupSynchronizedFromExternallSource(sess, group)).thenReturn(false);
AttributesManagerBl attributesManagerBl = mock(AttributesManagerBl.class);
when(perunBl.getAttributesManagerBl()).thenReturn(attributesManagerBl);
when(sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUP_STRUCTURE_SYNCHRO_INTERVAL_ATTRNAME)).thenReturn(syncInterval);
}
Aggregations