use of org.hisp.dhis.analytics.event.data.programindicator.DefaultProgramIndicatorSubqueryBuilder in project dhis2-core by dhis2.
the class AbstractJdbcEventAnalyticsManagerTest method setUp.
@BeforeEach
public void setUp() {
StatementBuilder statementBuilder = new PostgreSQLStatementBuilder();
DefaultProgramIndicatorSubqueryBuilder programIndicatorSubqueryBuilder = new DefaultProgramIndicatorSubqueryBuilder(programIndicatorService);
subject = new JdbcEventAnalyticsManager(jdbcTemplate, statementBuilder, programIndicatorService, programIndicatorSubqueryBuilder, new EventTimeFieldSqlRenderer(statementBuilder), executionPlanStore);
// data init
programA = createProgram('A');
dataElementA = createDataElement('A', ValueType.INTEGER, AggregationType.SUM);
dataElementA.setUid("fWIAEtYVEGk");
}
use of org.hisp.dhis.analytics.event.data.programindicator.DefaultProgramIndicatorSubqueryBuilder in project dhis2-core by dhis2.
the class EnrollmentAnalyticsManagerTest method setUp.
@BeforeEach
public void setUp() {
when(jdbcTemplate.queryForRowSet(anyString())).thenReturn(this.rowSet);
StatementBuilder statementBuilder = new PostgreSQLStatementBuilder();
DefaultProgramIndicatorSubqueryBuilder programIndicatorSubqueryBuilder = new DefaultProgramIndicatorSubqueryBuilder(programIndicatorService);
subject = new JdbcEnrollmentAnalyticsManager(jdbcTemplate, statementBuilder, programIndicatorService, programIndicatorSubqueryBuilder, new EnrollmentTimeFieldSqlRenderer(statementBuilder), executionPlanStore);
}
use of org.hisp.dhis.analytics.event.data.programindicator.DefaultProgramIndicatorSubqueryBuilder 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);
}
Aggregations