Search in sources :

Example 1 with JsonDataIntegrityCheck

use of org.hisp.dhis.webapi.json.domain.JsonDataIntegrityCheck in project dhis2-core by dhis2.

the class DataIntegrityChecksControllerTest method testGetAvailableChecks.

@Test
void testGetAvailableChecks() {
    JsonList<JsonDataIntegrityCheck> checks = GET("/dataIntegrity").content().asList(JsonDataIntegrityCheck.class);
    assertFalse(checks.isEmpty());
    assertCheckExists("categories_no_options", checks);
    assertCheckExists("categories_one_default_category", checks);
    assertCheckExists("categories_one_default_category_option", checks);
    assertCheckExists("categories_one_default_category_combo", checks);
    assertCheckExists("categories_one_default_category_option_combo", checks);
    assertCheckExists("categories_unique_category_combo", checks);
    for (DataIntegrityCheckType type : DataIntegrityCheckType.values()) {
        assertCheckExists(type.getName(), checks);
    }
}
Also used : JsonDataIntegrityCheck(org.hisp.dhis.webapi.json.domain.JsonDataIntegrityCheck) DataIntegrityCheckType(org.hisp.dhis.dataintegrity.DataIntegrityCheckType) Test(org.junit.jupiter.api.Test)

Aggregations

DataIntegrityCheckType (org.hisp.dhis.dataintegrity.DataIntegrityCheckType)1 JsonDataIntegrityCheck (org.hisp.dhis.webapi.json.domain.JsonDataIntegrityCheck)1 Test (org.junit.jupiter.api.Test)1