From 44ef9154c636f6838d8b866a639f9dd791d71feb Mon Sep 17 00:00:00 2001 From: "probation-integration-bot[bot]" <177347787+probation-integration-bot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:19:04 +0000 Subject: [PATCH] Formatting changes --- .../digital/hmpps/CreateAppointmentIntegrationTests.kt | 10 ++++++++-- .../hmpps/service/SentenceAppointmentService.kt | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/CreateAppointmentIntegrationTests.kt b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/CreateAppointmentIntegrationTests.kt index 4650ba8680..cd91268a06 100644 --- a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/CreateAppointmentIntegrationTests.kt +++ b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/CreateAppointmentIntegrationTests.kt @@ -124,8 +124,14 @@ class CreateAppointmentIntegrationTests { assertThat(appointments.size, equalTo(3)) assertThat(appointments[0].date, equalTo(LocalDate.now())) - assertThat(appointments[1].date, equalTo(LocalDate.now().plusDays(createAppointment.interval.value.toLong() * 1))) - assertThat(appointments[2].date, equalTo(LocalDate.now().plusDays(createAppointment.interval.value.toLong() * 2))) + assertThat( + appointments[1].date, + equalTo(LocalDate.now().plusDays(createAppointment.interval.value.toLong() * 1)) + ) + assertThat( + appointments[2].date, + equalTo(LocalDate.now().plusDays(createAppointment.interval.value.toLong() * 2)) + ) //check for unique external reference val externalRef = "urn:uk:gov:hmpps:manage-supervision-service:appointment:${createAppointment.uuid}" diff --git a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceAppointmentService.kt b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceAppointmentService.kt index d11785d10a..56d81b9743 100644 --- a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceAppointmentService.kt +++ b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceAppointmentService.kt @@ -42,7 +42,10 @@ class SentenceAppointmentService( createAppointment.let { val numberOfAppointments = createAppointment.until?.let { - Period.between(createAppointment.start.toLocalDate(), it.toLocalDate()).days.div(createAppointment.interval.value) + Period.between( + createAppointment.start.toLocalDate(), + it.toLocalDate() + ).days.div(createAppointment.interval.value) } ?: createAppointment.numberOfAppointments for (i in 0 until numberOfAppointments) {