From 6ff1e80a0e3308fefbc9ff583de541f0c4870db6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:18:43 +0000 Subject: [PATCH] Formatting changes --- .../hmpps/service/InterventionServiceTest.kt | 41 +++++++++++++------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/projects/court-case-and-delius/src/test/kotlin/uk/gov/justice/digital/hmpps/service/InterventionServiceTest.kt b/projects/court-case-and-delius/src/test/kotlin/uk/gov/justice/digital/hmpps/service/InterventionServiceTest.kt index 00a3052fa9..ee5bcdf082 100644 --- a/projects/court-case-and-delius/src/test/kotlin/uk/gov/justice/digital/hmpps/service/InterventionServiceTest.kt +++ b/projects/court-case-and-delius/src/test/kotlin/uk/gov/justice/digital/hmpps/service/InterventionServiceTest.kt @@ -14,7 +14,7 @@ class InterventionServiceTest { @Test fun `toRecallRejectedOrWithdrawn returns true `() { - val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC05", "REC05") + val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC05", "REC05") val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus) assertEquals(true, nsi.toRecallRejectedOrWithdrawn()) } @@ -22,51 +22,66 @@ class InterventionServiceTest { @Test fun `toRecallRejectedOrWithdrawn returns false due to no outcome`() { - val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") - val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null) + val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") + val nsi = + SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null) assertEquals(false, nsi.toRecallRejectedOrWithdrawn()) } @Test fun `toRecallRejectedOrWithdrawn returns null due to other status enum`() { - val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "OTHER", "OTHER") - val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null) + val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "OTHER", "OTHER") + val nsi = + SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null) assertEquals(null, nsi.toRecallRejectedOrWithdrawn()) } @Test fun `toRecallRejectedOrWithdrawn returns true due to outcome type enum`() { - val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") + val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") val outcome = ReferenceData("REC02", "REC02", IdGenerator.getAndIncrement()) - val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = outcome) + val nsi = SentenceGenerator.generateBreachNsi( + SentenceGenerator.CURRENT_SENTENCE, + status = nsiStatus, + outcome = outcome + ) assertEquals(true, nsi.toRecallRejectedOrWithdrawn()) } @Test fun `toOutcome returns null due to null outcome`() { - val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") - val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null) + val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") + val nsi = + SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = null) assertEquals(null, nsi.toOutcomeRecall()) } @Test fun `toOutcome returns false due to outcome type`() { - val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") + val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") val outcome = ReferenceData("REC02", "REC02", IdGenerator.getAndIncrement()) - val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = outcome) + val nsi = SentenceGenerator.generateBreachNsi( + SentenceGenerator.CURRENT_SENTENCE, + status = nsiStatus, + outcome = outcome + ) assertEquals(false, nsi.toOutcomeRecall()) } @Test fun `toOutcome returns true due to outcome type`() { - val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") + val nsiStatus = NsiStatus(IdGenerator.getAndIncrement(), "REC03", "REC03") val outcome = ReferenceData("REC03", "REC03", IdGenerator.getAndIncrement()) - val nsi = SentenceGenerator.generateBreachNsi(SentenceGenerator.CURRENT_SENTENCE, status = nsiStatus, outcome = outcome) + val nsi = SentenceGenerator.generateBreachNsi( + SentenceGenerator.CURRENT_SENTENCE, + status = nsiStatus, + outcome = outcome + ) assertEquals(true, nsi.toOutcomeRecall()) } }