use of cz.metacentrum.perun.core.bl.PerunBl 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.PerunBl 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.PerunBl 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.PerunBl in project perun by CESNET.
the class urn_perun_group_attribute_def_def_googleGroupName_namespaceTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_group_attribute_def_def_googleGroupName_namespace();
attributeToCheck = new Attribute(classInstance.getAttributeDefinition());
sess = mock(PerunSessionImpl.class);
PerunBl perunBl = mock(PerunBl.class);
when(sess.getPerunBl()).thenReturn(perunBl);
}
use of cz.metacentrum.perun.core.bl.PerunBl in project perun by CESNET.
the class urn_perun_group_attribute_def_def_groupExtSourceTest method setUp.
@Before
public void setUp() throws Exception {
classInstance = new urn_perun_group_attribute_def_def_groupExtSource();
attributeToCheck = new Attribute(classInstance.getAttributeDefinition());
sess = mock(PerunSessionImpl.class);
PerunBl perunBl = mock(PerunBl.class);
when(sess.getPerunBl()).thenReturn(perunBl);
GroupsManagerBl groupsManagerBl = mock(GroupsManagerBl.class);
when(perunBl.getGroupsManagerBl()).thenReturn(groupsManagerBl);
Vo groupVo = mock(Vo.class);
VosManagerBl vosManagerBl = mock(VosManagerBl.class);
when(perunBl.getVosManagerBl()).thenReturn(vosManagerBl);
when(sess.getPerunBl().getVosManagerBl().getVoById(sess, group.getVoId())).thenReturn(groupVo);
ExtSource extSource = new ExtSource(1, "my_example", "type");
ExtSourcesManagerBl extSourcesManagerBl = mock(ExtSourcesManagerBl.class);
when(sess.getPerunBl().getExtSourcesManagerBl()).thenReturn(extSourcesManagerBl);
when(sess.getPerunBl().getExtSourcesManagerBl().getVoExtSources(sess, groupVo)).thenReturn(Collections.singletonList(extSource));
}
Aggregations