Search in sources :

Example 1 with FacilityDataBuilder

use of org.motechproject.mots.testbuilder.FacilityDataBuilder in project mots by motech-implementations.

the class InchargeRepositoryIntegrationTest method setUp.

/**
 * Prepare the test environment.
 */
@Before
public void setUp() {
    districtRepository.save(district);
    chiefdomRepository.save(chiefdom);
    facility = new FacilityDataBuilder().withChiefdom(chiefdom).buildAsNew();
    facilityRepository.save(facility);
    incharge1 = new InchargeDataBuilder().withFacility(facility).buildAsNew();
    inchargeRepository.save(incharge1);
}
Also used : InchargeDataBuilder(org.motechproject.mots.testbuilder.InchargeDataBuilder) FacilityDataBuilder(org.motechproject.mots.testbuilder.FacilityDataBuilder) Before(org.junit.Before)

Example 2 with FacilityDataBuilder

use of org.motechproject.mots.testbuilder.FacilityDataBuilder in project mots by motech-implementations.

the class InchargeRepositoryIntegrationTest method getNewFacility.

private Facility getNewFacility() {
    Facility newFacility = new FacilityDataBuilder().withChiefdom(chiefdom).buildAsNew();
    facilityRepository.save(newFacility);
    return newFacility;
}
Also used : Facility(org.motechproject.mots.domain.Facility) FacilityDataBuilder(org.motechproject.mots.testbuilder.FacilityDataBuilder)

Aggregations

FacilityDataBuilder (org.motechproject.mots.testbuilder.FacilityDataBuilder)2 Before (org.junit.Before)1 Facility (org.motechproject.mots.domain.Facility)1 InchargeDataBuilder (org.motechproject.mots.testbuilder.InchargeDataBuilder)1