Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
probation-integration-bot[bot] authored Jan 27, 2025
1 parent b95c426 commit 60e670d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,28 @@ object PersonGenerator {
LocalDate.now()
)


val MAIN_CAT_F_SUB_ID = IdGenerator.getAndIncrement()
val MAIN_CAT_F_TYPE = ReferenceData(MAIN_CAT_F_SUB_ID, "G03", "High Intensity")
val UNIT = ReferenceData(IdGenerator.getAndIncrement(), "D", "Days")
val MAIN_CAT_F = RequirementMainCategory(IdGenerator.getAndIncrement(), "F", "Main", UNIT.id, UNIT)
val REQUIREMENT = generateRequirement(ACTIVE_ORDER, MAIN_CAT_F_SUB_ID, subCategory = MAIN_CAT_F_TYPE, mainCategory = MAIN_CAT_F, terminationDetails = null)
val REQUIREMENT = generateRequirement(
ACTIVE_ORDER,
MAIN_CAT_F_SUB_ID,
subCategory = MAIN_CAT_F_TYPE,
mainCategory = MAIN_CAT_F,
terminationDetails = null
)

val MAIN_CAT_W_SUB_ID = IdGenerator.getAndIncrement()
val MAIN_CAT_W_TYPE = ReferenceData(MAIN_CAT_W_SUB_ID, "W02", "Intensive")
val MAIN_CAT_W = RequirementMainCategory(IdGenerator.getAndIncrement(), "W", "Unpaid Work", UNIT.id, UNIT)
val REQUIREMENT_UNPAID_WORK = generateRequirement(ACTIVE_ORDER, MAIN_CAT_W_SUB_ID, subCategory = MAIN_CAT_W_TYPE, mainCategory = MAIN_CAT_W, terminationDetails = null)
val REQUIREMENT_UNPAID_WORK = generateRequirement(
ACTIVE_ORDER,
MAIN_CAT_W_SUB_ID,
subCategory = MAIN_CAT_W_TYPE,
mainCategory = MAIN_CAT_W,
terminationDetails = null
)

val REQUIREMENT_CONTACT_1 = ContactGenerator.generateContact(
OVERVIEW,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ class SentenceService(

fun RequirementEntity.toMinimalRequirement(): MinimalRequirement {
val rar = requirementService.getRar(disposal!!.id, mainCategory!!.code)
return MinimalRequirement(id, populateRequirementDescription(mainCategory.description, subCategory?.description, length, rar))
return MinimalRequirement(
id,
populateRequirementDescription(mainCategory.description, subCategory?.description, length, rar)
)
}

fun getUnpaidWorkTime(disposalId: Long): String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ class SentenceServiceTest {
whenever(requirementRepository.sumTotalUnpaidWorkHoursByDisposal(event.disposal!!.id)).thenReturn(70)
whenever(upwAppointmentRepository.calculateUnpaidTimeWorked(event.disposal!!.id)).thenReturn(3936)

whenever(requirementService.getRar(requirement1.disposal!!.id, requirement1.mainCategory!!.code)).thenReturn(null)
whenever(requirementService.getRar(requirement1.disposal!!.id, requirement1.mainCategory!!.code)).thenReturn(
null
)

val response = service.getEvents(PersonGenerator.OVERVIEW.crn, null)

Expand Down

0 comments on commit 60e670d

Please sign in to comment.