use of cz.metacentrum.perun.core.bl.GroupsManagerBl 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);
}
use of cz.metacentrum.perun.core.bl.GroupsManagerBl in project perun by CESNET.
the class urn_perun_group_attribute_def_def_synchronizationEnabledTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_group_attribute_def_def_synchronizationEnabled();
attributeToCheck = new Attribute(classInstance.getAttributeDefinition());
reqAttribute = 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;
attributesManagerBl = mock(AttributesManagerBl.class);
when(perunBl.getAttributesManagerBl()).thenReturn(attributesManagerBl);
when(sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUPMEMBERSQUERY_ATTRNAME)).thenReturn(reqAttribute);
when(sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, GroupsManager.GROUPEXTSOURCE_ATTRNAME)).thenReturn(reqAttribute);
}
use of cz.metacentrum.perun.core.bl.GroupsManagerBl in project perun by CESNET.
the class urn_perun_resource_attribute_def_def_unixGroupName_namespaceTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_resource_attribute_def_def_unixGroupName_namespace();
attributeToCheck = new Attribute();
attributeToCheck.setFriendlyName("unixGID-namespace");
sess = mock(PerunSessionImpl.class);
PerunBl perunBl = mock(PerunBl.class);
when(sess.getPerunBl()).thenReturn(perunBl);
AttributesManagerBl attributesManagerBl = mock(AttributesManagerBl.class);
when(perunBl.getAttributesManagerBl()).thenReturn(attributesManagerBl);
when(sess.getPerunBl().getAttributesManagerBl().getAttributeDefinition(sess, AttributesManager.NS_GROUP_ATTR_DEF + ":unixGroupName-namespace:")).thenReturn(attributeToCheck);
GroupsManagerBl groupsManagerBl = mock(GroupsManagerBl.class);
when(sess.getPerunBl().getGroupsManagerBl()).thenReturn(groupsManagerBl);
ModulesUtilsBl modulesUtilsBl = mock(ModulesUtilsBl.class);
when(sess.getPerunBl().getModulesUtilsBl()).thenReturn(modulesUtilsBl);
ResourcesManagerBl resourcesManagerBl = mock(ResourcesManagerBl.class);
when(sess.getPerunBl().getResourcesManagerBl()).thenReturn(resourcesManagerBl);
}
Aggregations