Search in sources :

Example 1 with DefaultOrganisationUnitService

use of org.hisp.dhis.organisationunit.DefaultOrganisationUnitService in project dhis2-core by dhis2.

the class QueryParserTest method setUpTest.

@Override
protected void setUpTest() throws Exception {
    OrganisationUnit orgUnitA = createOrganisationUnit('A');
    User user = createUser('A');
    user.addOrganisationUnit(orgUnitA);
    CurrentUserService currentUserService = new MockCurrentUserService(user);
    this.organisationUnitService = new DefaultOrganisationUnitService(organisationUnitStore, dataSetService, organisationUnitLevelStore, currentUserService, configurationService, userSettingService, cacheProvider);
    organisationUnitService.addOrganisationUnit(orgUnitA);
    identifiableObjectManager.save(orgUnitA);
    queryParser = new DefaultJpaQueryParser(schemaService);
}
Also used : OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) User(org.hisp.dhis.user.User) MockCurrentUserService(org.hisp.dhis.mock.MockCurrentUserService) DefaultOrganisationUnitService(org.hisp.dhis.organisationunit.DefaultOrganisationUnitService) MockCurrentUserService(org.hisp.dhis.mock.MockCurrentUserService) CurrentUserService(org.hisp.dhis.user.CurrentUserService)

Aggregations

MockCurrentUserService (org.hisp.dhis.mock.MockCurrentUserService)1 DefaultOrganisationUnitService (org.hisp.dhis.organisationunit.DefaultOrganisationUnitService)1 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)1 CurrentUserService (org.hisp.dhis.user.CurrentUserService)1 User (org.hisp.dhis.user.User)1