Skip to content

Commit

Permalink
Add Approved Premises Womens Estate Test Data
Browse files Browse the repository at this point in the history
This commit adds a Female Probation Case and additional Staff Member to support testing of the Women’s Estate Solution
  • Loading branch information
davidatkinsuk committed Sep 30, 2024
1 parent bafb324 commit 00a5450
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ class DataLoader(
staffRepository.save(StaffGenerator.LAO_RESTRICTED)
staffUserRepository.save(StaffGenerator.LAO_RESTRICTED_USER)

staffRepository.save(StaffGenerator.CRU_WOMENS_ESTATE)
staffUserRepository.save(StaffGenerator.CRU_WOMENS_ESTATE_USER)

val personManagerStaff = StaffGenerator.generate(code = "N54A001")
staffRepository.save(personManagerStaff)
val person = PersonGenerator.DEFAULT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,18 @@ object ProbationCaseGenerator {
currentExclusion = true,
currentRestriction = true
)
val CASE_SIMPLE = generate("S517283", "Teresa", "Green", LocalDate.of(1987, 8, 2))
val CASE_SIMPLE = generate(
crn = "S517283",
forename = "Teresa",
surname = "Green",
dateOfBirth = LocalDate.of(1987, 8, 2),
nomsId = "A1237AI",
gender = ReferenceDataGenerator.GENDER_FEMALE,
ethnicity = ReferenceDataGenerator.ETHNICITY_WHITE,
nationality = ReferenceDataGenerator.NATIONALITY_BRITISH,
religion = ReferenceDataGenerator.RELIGION_OTHER,
genderIdentity = ReferenceDataGenerator.GENDER_IDENTITY_PNS,
)
val CASE_X320741 = generate(
crn = "X320741",
forename = "Aadland",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ object ReferenceDataGenerator {
val REFERRAL_COMPLETED = generate("APRC", ALL_DATASETS[DatasetCode.NSI_OUTCOME]!!.id)

val ETHNICITY_WHITE = generate("W1", ETHNICITY.id, "White: British/English/Welsh/Scottish/Northern Irish")
val GENDER_FEMALE = generate("F", GENDER.id, "Female")
val GENDER_MALE = generate("M", GENDER.id, "Male")
val GENDER_IDENTITY_PNS = generate("GIRF", GENDER_IDENTITY.id, "Prefer not to say")
val NATIONALITY_BRITISH = generate("BRIT", NATIONALITY.id, "British")
Expand Down Expand Up @@ -98,6 +99,7 @@ object ReferenceDataGenerator {
NON_ARRIVAL,
REFERRAL_COMPLETED,
ETHNICITY_WHITE,
GENDER_FEMALE,
GENDER_MALE,
GENDER_IDENTITY_PNS,
NATIONALITY_BRITISH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ object StaffGenerator {
val LAO_RESTRICTED = generate(
name = "LAO Restricted"
)
val CRU_WOMENS_ESTATE = generate(
name = "CRU Womens Estate"
)

val DEFAULT_STAFF_USER = generateStaffUser("john-smith", DEFAULT_STAFF)
val JIM_SNOW_USER = generateStaffUser("JIMSNOWLDAP", JIM_SNOW)
val LAO_FULL_ACCESS_USER = generateStaffUser("LAOFULLACCESS", LAO_FULL_ACCESS)
val LAO_RESTRICTED_USER = generateStaffUser("LAORESTRICTED", LAO_RESTRICTED)
val CRU_WOMENS_ESTATE_USER = generateStaffUser("CRUWOMENSESTATE", CRU_WOMENS_ESTATE)

fun generate(
name: String = "Test",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ cn: jimsnowldap
sn: Jim Snow
givenname: Test
mail: [email protected]
telephoneNumber: 07321165374
telephoneNumber: 07321165374

dn: cn=cruwomensestate,ou=Users,dc=moj,dc=com
objectclass: top
objectclass: inetOrgPerson
cn: cruwomensestate
sn: Womens Estate
givenname: CRU
mail: [email protected]
telephoneNumber: 07321165375

0 comments on commit 00a5450

Please sign in to comment.