generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into MAN-109-backend-create-appointment-in-mms
- Loading branch information
Showing
101 changed files
with
2,054 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rc/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/BusinessInteractionGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package uk.gov.justice.digital.hmpps.data.generator | ||
|
||
import uk.gov.justice.digital.hmpps.audit.BusinessInteraction | ||
import uk.gov.justice.digital.hmpps.integrations.delius.audit.BusinessInteractionCode | ||
import java.time.ZonedDateTime | ||
|
||
object BusinessInteractionGenerator { | ||
val INSERT_PERSON = BusinessInteraction( | ||
IdGenerator.getAndIncrement(), | ||
BusinessInteractionCode.INSERT_PERSON.code, | ||
ZonedDateTime.now().minusMonths(6) | ||
) | ||
val INSERT_ADDRESS = BusinessInteraction( | ||
IdGenerator.getAndIncrement(), | ||
BusinessInteractionCode.INSERT_ADDRESS.code, | ||
ZonedDateTime.now().minusMonths(6) | ||
) | ||
} |
12 changes: 10 additions & 2 deletions
12
...and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/MessageGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
package uk.gov.justice.digital.hmpps.data.generator | ||
|
||
import uk.gov.justice.digital.hmpps.message.HmppsDomainEvent | ||
import uk.gov.justice.digital.hmpps.messaging.CommonPlatformHearing | ||
import uk.gov.justice.digital.hmpps.resourceloader.ResourceLoader | ||
|
||
object MessageGenerator { | ||
val EXAMPLE = ResourceLoader.message<HmppsDomainEvent>("example-message") | ||
val COMMON_PLATFORM_EVENT = ResourceLoader.message<CommonPlatformHearing>("common-platform-hearing") | ||
val COMMON_PLATFORM_EVENT_DOB_ERROR = | ||
ResourceLoader.message<CommonPlatformHearing>("common-platform-hearing-dob-error") | ||
val COMMON_PLATFORM_EVENT_NO_CASES = | ||
ResourceLoader.message<CommonPlatformHearing>("common-platform-hearing-no-cases") | ||
val COMMON_PLATFORM_EVENT_BLANK_ADDRESS = | ||
ResourceLoader.message<CommonPlatformHearing>("common-platform-hearing-blank-address") | ||
val COMMON_PLATFORM_EVENT_NO_REMAND = | ||
ResourceLoader.message<CommonPlatformHearing>("common-platform-hearing-no-remand") | ||
} |
24 changes: 24 additions & 0 deletions
24
...lius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/PersonAddressGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package uk.gov.justice.digital.hmpps.data.generator | ||
|
||
import uk.gov.justice.digital.hmpps.integrations.delius.entity.Person | ||
import uk.gov.justice.digital.hmpps.integrations.delius.person.entity.PersonAddress | ||
import java.time.LocalDate | ||
|
||
object PersonAddressGenerator { | ||
val MAIN_ADDRESS = generate(person = PersonGenerator.DEFAULT) | ||
|
||
fun generate( | ||
id: Long? = IdGenerator.getAndIncrement(), | ||
person: Person, | ||
notes: String? = null, | ||
postcode: String? = null, | ||
) = PersonAddress( | ||
id = id, | ||
start = LocalDate.now(), | ||
status = ReferenceDataGenerator.MAIN_ADDRESS_STATUS, | ||
person = person, | ||
notes = notes, | ||
postcode = postcode, | ||
type = ReferenceDataGenerator.AWAITING_ASSESSMENT | ||
) | ||
} |
Oops, something went wrong.