Search in sources :

Example 31 with Event

use of org.hisp.dhis.tracker.domain.Event in project dhis2-core by dhis2.

the class PreCheckDataRelationsValidationHookTest method eventValidationFailsWhenOnlyAOCIsSetToDefaultAOCNotInProgramCC.

@Test
void eventValidationFailsWhenOnlyAOCIsSetToDefaultAOCNotInProgramCC() {
    OrganisationUnit orgUnit = setupOrgUnit();
    Program program = setupProgram(orgUnit);
    program.setCategoryCombo(categoryCombo('A'));
    CategoryOptionCombo defaultAOC = firstCategoryOptionCombo(defaultCategoryCombo());
    when(preheat.getCategoryOptionCombo(defaultAOC.getUid())).thenReturn(defaultAOC);
    Event event = eventBuilder().attributeOptionCombo(defaultAOC.getUid()).build();
    hook.validateEvent(reporter, event);
    assertEquals(1, reporter.getReportList().size());
    assertTrue(reporter.hasErrorReport(r -> r.getErrorCode() == TrackerErrorCode.E1055));
    assertNull(reporter.getValidationContext().getCachedEventCategoryOptionCombo(event.getEvent()), "AOC id should not be cached");
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CategoryService(org.hisp.dhis.category.CategoryService) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) CategoryOption(org.hisp.dhis.category.CategoryOption) TrackerIdentifier(org.hisp.dhis.tracker.TrackerIdentifier) RelationshipConstraint(org.hisp.dhis.relationship.RelationshipConstraint) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) ProgramInstance(org.hisp.dhis.program.ProgramInstance) ReferenceTrackerEntity(org.hisp.dhis.tracker.preheat.ReferenceTrackerEntity) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) TrackedEntity(org.hisp.dhis.tracker.domain.TrackedEntity) TrackedEntityInstance(org.hisp.dhis.trackedentity.TrackedEntityInstance) Category(org.hisp.dhis.category.Category) RelationshipItem(org.hisp.dhis.tracker.domain.RelationshipItem) TrackerBundle(org.hisp.dhis.tracker.bundle.TrackerBundle) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) Test(org.junit.jupiter.api.Test) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) ProgramType(org.hisp.dhis.program.ProgramType) Optional(java.util.Optional) TrackedEntityType(org.hisp.dhis.trackedentity.TrackedEntityType) CategoryCombo(org.hisp.dhis.category.CategoryCombo) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) DataDimensionType(org.hisp.dhis.common.DataDimensionType) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Mock(org.mockito.Mock) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) ValidationErrorReporter(org.hisp.dhis.tracker.report.ValidationErrorReporter) Relationship(org.hisp.dhis.tracker.domain.Relationship) Program(org.hisp.dhis.program.Program) Enrollment(org.hisp.dhis.tracker.domain.Enrollment) TrackerIdentifierParams(org.hisp.dhis.tracker.TrackerIdentifierParams) TrackerImportValidationContext(org.hisp.dhis.tracker.validation.TrackerImportValidationContext) RelationshipType(org.hisp.dhis.relationship.RelationshipType) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) TRACKED_ENTITY_INSTANCE(org.hisp.dhis.relationship.RelationshipEntity.TRACKED_ENTITY_INSTANCE) RelationshipEntity(org.hisp.dhis.relationship.RelationshipEntity) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) Event(org.hisp.dhis.tracker.domain.Event) TrackerErrorReport(org.hisp.dhis.tracker.report.TrackerErrorReport) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) ProgramStage(org.hisp.dhis.program.ProgramStage) Mockito.verify(org.mockito.Mockito.verify) TrackerErrorCode(org.hisp.dhis.tracker.report.TrackerErrorCode) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Matchers.hasItem(org.hamcrest.Matchers.hasItem) CodeGenerator(org.hisp.dhis.common.CodeGenerator) Collections(java.util.Collections) TrackerPreheat(org.hisp.dhis.tracker.preheat.TrackerPreheat) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Program(org.hisp.dhis.program.Program) Event(org.hisp.dhis.tracker.domain.Event) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Test(org.junit.jupiter.api.Test) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest)

Example 32 with Event

use of org.hisp.dhis.tracker.domain.Event in project dhis2-core by dhis2.

the class PreCheckDataRelationsValidationHookTest method eventValidationSucceedsWhenOnlyCOsAreSetAndExist.

@Test
void eventValidationSucceedsWhenOnlyCOsAreSetAndExist() {
    OrganisationUnit orgUnit = setupOrgUnit();
    Program program = setupProgram(orgUnit);
    CategoryCombo cc = categoryCombo();
    program.setCategoryCombo(cc);
    CategoryOption co = cc.getCategoryOptions().get(0);
    when(preheat.getCategoryOption(co.getUid())).thenReturn(co);
    CategoryOptionCombo aoc = firstCategoryOptionCombo(cc);
    when(categoryService.getCategoryOptionCombo(cc, Sets.newHashSet(co))).thenReturn(aoc);
    when(preheat.getIdentifiers()).thenReturn(TrackerIdentifierParams.builder().categoryOptionComboIdScheme(TrackerIdentifier.NAME).build());
    Event event = eventBuilder().attributeOptionCombo(null).attributeCategoryOptions(co.getUid()).build();
    hook.validateEvent(reporter, event);
    assertFalse(reporter.hasErrors());
    assertEquals(aoc, reporter.getValidationContext().getCachedEventCategoryOptionCombo(event.getEvent()), "AOC id should be cached");
    assertEquals(aoc.getName(), event.getAttributeOptionCombo(), "AOC id should be set by the validation");
    verify(preheat, times(1)).put(TrackerIdentifier.NAME, aoc);
}
Also used : OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Program(org.hisp.dhis.program.Program) CategoryCombo(org.hisp.dhis.category.CategoryCombo) CategoryOption(org.hisp.dhis.category.CategoryOption) Event(org.hisp.dhis.tracker.domain.Event) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Test(org.junit.jupiter.api.Test) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest)

Example 33 with Event

use of org.hisp.dhis.tracker.domain.Event in project dhis2-core by dhis2.

the class PreCheckDataRelationsValidationHookTest method eventValidationFailsWhenEventAOCAndEventCOsAreSetAndCOIsNotFound.

@Test
void eventValidationFailsWhenEventAOCAndEventCOsAreSetAndCOIsNotFound() {
    OrganisationUnit orgUnit = setupOrgUnit();
    Program program = setupProgram(orgUnit);
    CategoryCombo cc = categoryCombo();
    program.setCategoryCombo(cc);
    CategoryOptionCombo aoc = firstCategoryOptionCombo(cc);
    when(preheat.getCategoryOptionCombo(aoc.getUid())).thenReturn(aoc);
    String UNKNOWN_CO_ID = CodeGenerator.generateUid();
    when(preheat.getCategoryOption(UNKNOWN_CO_ID)).thenReturn(null);
    Event event = eventBuilder().attributeOptionCombo(aoc.getUid()).attributeCategoryOptions(UNKNOWN_CO_ID).build();
    hook.validateEvent(reporter, event);
    assertEquals(1, reporter.getReportList().size());
    assertTrue(reporter.hasErrorReport(r -> r.getErrorCode() == TrackerErrorCode.E1116));
    assertNull(reporter.getValidationContext().getCachedEventCategoryOptionCombo(event.getEvent()), "AOC id should not be cached");
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CategoryService(org.hisp.dhis.category.CategoryService) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) CategoryOption(org.hisp.dhis.category.CategoryOption) TrackerIdentifier(org.hisp.dhis.tracker.TrackerIdentifier) RelationshipConstraint(org.hisp.dhis.relationship.RelationshipConstraint) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) ProgramInstance(org.hisp.dhis.program.ProgramInstance) ReferenceTrackerEntity(org.hisp.dhis.tracker.preheat.ReferenceTrackerEntity) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) TrackedEntity(org.hisp.dhis.tracker.domain.TrackedEntity) TrackedEntityInstance(org.hisp.dhis.trackedentity.TrackedEntityInstance) Category(org.hisp.dhis.category.Category) RelationshipItem(org.hisp.dhis.tracker.domain.RelationshipItem) TrackerBundle(org.hisp.dhis.tracker.bundle.TrackerBundle) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) Test(org.junit.jupiter.api.Test) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) ProgramType(org.hisp.dhis.program.ProgramType) Optional(java.util.Optional) TrackedEntityType(org.hisp.dhis.trackedentity.TrackedEntityType) CategoryCombo(org.hisp.dhis.category.CategoryCombo) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) DataDimensionType(org.hisp.dhis.common.DataDimensionType) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Mock(org.mockito.Mock) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) ValidationErrorReporter(org.hisp.dhis.tracker.report.ValidationErrorReporter) Relationship(org.hisp.dhis.tracker.domain.Relationship) Program(org.hisp.dhis.program.Program) Enrollment(org.hisp.dhis.tracker.domain.Enrollment) TrackerIdentifierParams(org.hisp.dhis.tracker.TrackerIdentifierParams) TrackerImportValidationContext(org.hisp.dhis.tracker.validation.TrackerImportValidationContext) RelationshipType(org.hisp.dhis.relationship.RelationshipType) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) TRACKED_ENTITY_INSTANCE(org.hisp.dhis.relationship.RelationshipEntity.TRACKED_ENTITY_INSTANCE) RelationshipEntity(org.hisp.dhis.relationship.RelationshipEntity) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) Event(org.hisp.dhis.tracker.domain.Event) TrackerErrorReport(org.hisp.dhis.tracker.report.TrackerErrorReport) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) ProgramStage(org.hisp.dhis.program.ProgramStage) Mockito.verify(org.mockito.Mockito.verify) TrackerErrorCode(org.hisp.dhis.tracker.report.TrackerErrorCode) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Matchers.hasItem(org.hamcrest.Matchers.hasItem) CodeGenerator(org.hisp.dhis.common.CodeGenerator) Collections(java.util.Collections) TrackerPreheat(org.hisp.dhis.tracker.preheat.TrackerPreheat) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Program(org.hisp.dhis.program.Program) CategoryCombo(org.hisp.dhis.category.CategoryCombo) Event(org.hisp.dhis.tracker.domain.Event) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Test(org.junit.jupiter.api.Test) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest)

Example 34 with Event

use of org.hisp.dhis.tracker.domain.Event in project dhis2-core by dhis2.

the class PreCheckDataRelationsValidationHookTest method eventValidationFailsWhenOnlyCOsAreSetToCONotInCCAndEventProgramHasDefaultCC.

@Test
void eventValidationFailsWhenOnlyCOsAreSetToCONotInCCAndEventProgramHasDefaultCC() {
    OrganisationUnit orgUnit = setupOrgUnit();
    Program program = setupProgram(orgUnit);
    CategoryCombo defaultCC = defaultCategoryCombo();
    program.setCategoryCombo(defaultCC);
    CategoryOptionCombo defaultAOC = firstCategoryOptionCombo(defaultCC);
    when(preheat.getDefault(CategoryOptionCombo.class)).thenReturn(defaultAOC);
    CategoryCombo cc = categoryCombo();
    CategoryOption co = cc.getCategoryOptions().get(0);
    when(preheat.getCategoryOption(co.getUid())).thenReturn(co);
    Event event = eventBuilder().attributeCategoryOptions(co.getUid()).build();
    hook.validateEvent(reporter, event);
    assertEquals(1, reporter.getReportList().size());
    assertTrue(reporter.hasErrorReport(r -> r.getErrorCode() == TrackerErrorCode.E1117 && r.getErrorMessage().contains(program.getCategoryCombo().getUid()) && r.getErrorMessage().contains(co.getUid())));
    assertNull(reporter.getValidationContext().getCachedEventCategoryOptionCombo(event.getEvent()), "AOC id should not be cached");
    verify(preheat, times(0)).put(any(), (IdentifiableObject) any());
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CategoryService(org.hisp.dhis.category.CategoryService) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) CategoryOption(org.hisp.dhis.category.CategoryOption) TrackerIdentifier(org.hisp.dhis.tracker.TrackerIdentifier) RelationshipConstraint(org.hisp.dhis.relationship.RelationshipConstraint) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) ProgramInstance(org.hisp.dhis.program.ProgramInstance) ReferenceTrackerEntity(org.hisp.dhis.tracker.preheat.ReferenceTrackerEntity) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) TrackedEntity(org.hisp.dhis.tracker.domain.TrackedEntity) TrackedEntityInstance(org.hisp.dhis.trackedentity.TrackedEntityInstance) Category(org.hisp.dhis.category.Category) RelationshipItem(org.hisp.dhis.tracker.domain.RelationshipItem) TrackerBundle(org.hisp.dhis.tracker.bundle.TrackerBundle) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) Test(org.junit.jupiter.api.Test) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) ProgramType(org.hisp.dhis.program.ProgramType) Optional(java.util.Optional) TrackedEntityType(org.hisp.dhis.trackedentity.TrackedEntityType) CategoryCombo(org.hisp.dhis.category.CategoryCombo) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) DataDimensionType(org.hisp.dhis.common.DataDimensionType) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Mock(org.mockito.Mock) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) ValidationErrorReporter(org.hisp.dhis.tracker.report.ValidationErrorReporter) Relationship(org.hisp.dhis.tracker.domain.Relationship) Program(org.hisp.dhis.program.Program) Enrollment(org.hisp.dhis.tracker.domain.Enrollment) TrackerIdentifierParams(org.hisp.dhis.tracker.TrackerIdentifierParams) TrackerImportValidationContext(org.hisp.dhis.tracker.validation.TrackerImportValidationContext) RelationshipType(org.hisp.dhis.relationship.RelationshipType) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) TRACKED_ENTITY_INSTANCE(org.hisp.dhis.relationship.RelationshipEntity.TRACKED_ENTITY_INSTANCE) RelationshipEntity(org.hisp.dhis.relationship.RelationshipEntity) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) Event(org.hisp.dhis.tracker.domain.Event) TrackerErrorReport(org.hisp.dhis.tracker.report.TrackerErrorReport) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) ProgramStage(org.hisp.dhis.program.ProgramStage) Mockito.verify(org.mockito.Mockito.verify) TrackerErrorCode(org.hisp.dhis.tracker.report.TrackerErrorCode) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Matchers.hasItem(org.hamcrest.Matchers.hasItem) CodeGenerator(org.hisp.dhis.common.CodeGenerator) Collections(java.util.Collections) TrackerPreheat(org.hisp.dhis.tracker.preheat.TrackerPreheat) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Program(org.hisp.dhis.program.Program) CategoryCombo(org.hisp.dhis.category.CategoryCombo) CategoryOption(org.hisp.dhis.category.CategoryOption) Event(org.hisp.dhis.tracker.domain.Event) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Test(org.junit.jupiter.api.Test) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest)

Example 35 with Event

use of org.hisp.dhis.tracker.domain.Event in project dhis2-core by dhis2.

the class PreCheckDataRelationsValidationHookTest method eventValidationFailsWhenEventAOCAndEventCOsAreSetAndAOCIsNotFound.

@Test
void eventValidationFailsWhenEventAOCAndEventCOsAreSetAndAOCIsNotFound() {
    OrganisationUnit orgUnit = setupOrgUnit();
    Program program = setupProgram(orgUnit);
    CategoryCombo cc = categoryCombo();
    program.setCategoryCombo(cc);
    CategoryOption co = cc.getCategoryOptions().get(0);
    when(preheat.getCategoryOption(co.getUid())).thenReturn(co);
    String UNKNOWN_AOC_ID = CodeGenerator.generateUid();
    when(preheat.getCategoryOptionCombo(UNKNOWN_AOC_ID)).thenReturn(null);
    Event event = eventBuilder().attributeOptionCombo(UNKNOWN_AOC_ID).attributeCategoryOptions(co.getUid()).build();
    hook.validateEvent(reporter, event);
    assertEquals(1, reporter.getReportList().size());
    assertTrue(reporter.hasErrorReport(r -> r.getErrorCode() == TrackerErrorCode.E1115));
    assertNull(reporter.getValidationContext().getCachedEventCategoryOptionCombo(event.getEvent()), "AOC id should not be cached");
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CategoryService(org.hisp.dhis.category.CategoryService) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) CategoryOption(org.hisp.dhis.category.CategoryOption) TrackerIdentifier(org.hisp.dhis.tracker.TrackerIdentifier) RelationshipConstraint(org.hisp.dhis.relationship.RelationshipConstraint) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) ProgramInstance(org.hisp.dhis.program.ProgramInstance) ReferenceTrackerEntity(org.hisp.dhis.tracker.preheat.ReferenceTrackerEntity) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) TrackedEntity(org.hisp.dhis.tracker.domain.TrackedEntity) TrackedEntityInstance(org.hisp.dhis.trackedentity.TrackedEntityInstance) Category(org.hisp.dhis.category.Category) RelationshipItem(org.hisp.dhis.tracker.domain.RelationshipItem) TrackerBundle(org.hisp.dhis.tracker.bundle.TrackerBundle) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) Test(org.junit.jupiter.api.Test) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) ProgramType(org.hisp.dhis.program.ProgramType) Optional(java.util.Optional) TrackedEntityType(org.hisp.dhis.trackedentity.TrackedEntityType) CategoryCombo(org.hisp.dhis.category.CategoryCombo) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) DataDimensionType(org.hisp.dhis.common.DataDimensionType) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Mock(org.mockito.Mock) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) ValidationErrorReporter(org.hisp.dhis.tracker.report.ValidationErrorReporter) Relationship(org.hisp.dhis.tracker.domain.Relationship) Program(org.hisp.dhis.program.Program) Enrollment(org.hisp.dhis.tracker.domain.Enrollment) TrackerIdentifierParams(org.hisp.dhis.tracker.TrackerIdentifierParams) TrackerImportValidationContext(org.hisp.dhis.tracker.validation.TrackerImportValidationContext) RelationshipType(org.hisp.dhis.relationship.RelationshipType) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) TRACKED_ENTITY_INSTANCE(org.hisp.dhis.relationship.RelationshipEntity.TRACKED_ENTITY_INSTANCE) RelationshipEntity(org.hisp.dhis.relationship.RelationshipEntity) IdentifiableObject(org.hisp.dhis.common.IdentifiableObject) Event(org.hisp.dhis.tracker.domain.Event) TrackerErrorReport(org.hisp.dhis.tracker.report.TrackerErrorReport) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) ProgramStage(org.hisp.dhis.program.ProgramStage) Mockito.verify(org.mockito.Mockito.verify) TrackerErrorCode(org.hisp.dhis.tracker.report.TrackerErrorCode) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Matchers.hasItem(org.hamcrest.Matchers.hasItem) CodeGenerator(org.hisp.dhis.common.CodeGenerator) Collections(java.util.Collections) TrackerPreheat(org.hisp.dhis.tracker.preheat.TrackerPreheat) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) Program(org.hisp.dhis.program.Program) CategoryCombo(org.hisp.dhis.category.CategoryCombo) CategoryOption(org.hisp.dhis.category.CategoryOption) Event(org.hisp.dhis.tracker.domain.Event) Test(org.junit.jupiter.api.Test) DhisConvenienceTest(org.hisp.dhis.DhisConvenienceTest)

Aggregations

Event (org.hisp.dhis.tracker.domain.Event)192 Test (org.junit.jupiter.api.Test)153 ValidationErrorReporter (org.hisp.dhis.tracker.report.ValidationErrorReporter)114 ProgramStage (org.hisp.dhis.program.ProgramStage)68 DhisConvenienceTest (org.hisp.dhis.DhisConvenienceTest)64 TrackerBundle (org.hisp.dhis.tracker.bundle.TrackerBundle)53 Enrollment (org.hisp.dhis.tracker.domain.Enrollment)43 TrackedEntity (org.hisp.dhis.tracker.domain.TrackedEntity)41 Mockito.when (org.mockito.Mockito.when)38 Assertions.assertTrue (org.junit.jupiter.api.Assertions.assertTrue)37 Assertions.assertFalse (org.junit.jupiter.api.Assertions.assertFalse)36 DataElement (org.hisp.dhis.dataelement.DataElement)35 Program (org.hisp.dhis.program.Program)35 ProgramInstance (org.hisp.dhis.program.ProgramInstance)35 DataValue (org.hisp.dhis.tracker.domain.DataValue)35 TrackerPreheat (org.hisp.dhis.tracker.preheat.TrackerPreheat)35 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)34 TrackerErrorCode (org.hisp.dhis.tracker.report.TrackerErrorCode)33 CodeGenerator (org.hisp.dhis.common.CodeGenerator)32 BeforeEach (org.junit.jupiter.api.BeforeEach)32