Search in sources :

Example 11 with RegionDto

use of de.symeda.sormas.api.infrastructure.region.RegionDto in project SORMAS-Project by hzi-braunschweig.

the class TestDataCreator method createRDCF.

public RDCF createRDCF(String regionName, String districtName, String communityName, String facilityName) {
    RegionDto region = createRegion(regionName);
    DistrictDto district = createDistrict(districtName, region.toReference());
    CommunityDto community = createCommunity(communityName, district.toReference());
    FacilityDto facility = createFacility(facilityName, region.toReference(), district.toReference(), community.toReference());
    return new RDCF(region, district, community, facility);
}
Also used : DistrictDto(de.symeda.sormas.api.infrastructure.district.DistrictDto) CommunityDto(de.symeda.sormas.api.infrastructure.community.CommunityDto) RegionDto(de.symeda.sormas.api.infrastructure.region.RegionDto) FacilityDto(de.symeda.sormas.api.infrastructure.facility.FacilityDto)

Example 12 with RegionDto

use of de.symeda.sormas.api.infrastructure.region.RegionDto in project SORMAS-Project by hzi-braunschweig.

the class TestDataCreator method createRegion.

public RegionDto createRegion(String regionName) {
    RegionDto region = RegionDto.build();
    region.setUuid(DataHelper.createUuid());
    region.setName(regionName);
    FacadeProvider.getRegionFacade().save(region);
    return region;
}
Also used : RegionDto(de.symeda.sormas.api.infrastructure.region.RegionDto)

Aggregations

RegionDto (de.symeda.sormas.api.infrastructure.region.RegionDto)12 Date (java.util.Date)5 Test (org.junit.Test)5 DistrictDto (de.symeda.sormas.api.infrastructure.district.DistrictDto)3 UserDto (de.symeda.sormas.api.user.UserDto)3 AbstractBeanTest (de.symeda.sormas.backend.AbstractBeanTest)3 ImportErrorException (de.symeda.sormas.api.importexport.ImportErrorException)2 PopulationDataDto (de.symeda.sormas.api.infrastructure.PopulationDataDto)2 CommunityDto (de.symeda.sormas.api.infrastructure.community.CommunityDto)2 RegionReferenceDto (de.symeda.sormas.api.infrastructure.region.RegionReferenceDto)2 ArrayList (java.util.ArrayList)2 AgeGroup (de.symeda.sormas.api.AgeGroup)1 FacadeProvider (de.symeda.sormas.api.FacadeProvider)1 CaseDataDto (de.symeda.sormas.api.caze.CaseDataDto)1 I18nProperties (de.symeda.sormas.api.i18n.I18nProperties)1 Validations (de.symeda.sormas.api.i18n.Validations)1 ImportCellData (de.symeda.sormas.api.importexport.ImportCellData)1 InvalidColumnException (de.symeda.sormas.api.importexport.InvalidColumnException)1 ValueSeparator (de.symeda.sormas.api.importexport.ValueSeparator)1 PopulationDataCriteria (de.symeda.sormas.api.infrastructure.PopulationDataCriteria)1