Search in sources :

Example 1 with ProgramIndicatorService

use of org.hisp.dhis.program.ProgramIndicatorService in project dhis2-core by dhis2.

the class EventsAnalyticsManagerTest method setUp.

@BeforeEach
public void setUp() {
    StatementBuilder statementBuilder = new PostgreSQLStatementBuilder();
    EventTimeFieldSqlRenderer timeCoordinateSelector = new EventTimeFieldSqlRenderer(statementBuilder);
    ProgramIndicatorService programIndicatorService = mock(ProgramIndicatorService.class);
    DefaultProgramIndicatorSubqueryBuilder programIndicatorSubqueryBuilder = new DefaultProgramIndicatorSubqueryBuilder(programIndicatorService);
    subject = new JdbcEventAnalyticsManager(jdbcTemplate, statementBuilder, programIndicatorService, programIndicatorSubqueryBuilder, timeCoordinateSelector, executionPlanStore);
    when(jdbcTemplate.queryForRowSet(anyString())).thenReturn(this.rowSet);
}
Also used : PostgreSQLStatementBuilder(org.hisp.dhis.jdbc.statementbuilder.PostgreSQLStatementBuilder) StatementBuilder(org.hisp.dhis.jdbc.StatementBuilder) DefaultProgramIndicatorSubqueryBuilder(org.hisp.dhis.analytics.event.data.programindicator.DefaultProgramIndicatorSubqueryBuilder) PostgreSQLStatementBuilder(org.hisp.dhis.jdbc.statementbuilder.PostgreSQLStatementBuilder) ProgramIndicatorService(org.hisp.dhis.program.ProgramIndicatorService) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

DefaultProgramIndicatorSubqueryBuilder (org.hisp.dhis.analytics.event.data.programindicator.DefaultProgramIndicatorSubqueryBuilder)1 StatementBuilder (org.hisp.dhis.jdbc.StatementBuilder)1 PostgreSQLStatementBuilder (org.hisp.dhis.jdbc.statementbuilder.PostgreSQLStatementBuilder)1 ProgramIndicatorService (org.hisp.dhis.program.ProgramIndicatorService)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1