Skip to content

Commit abc4423

Browse files
Added better test data in controller test
1 parent f627718 commit abc4423

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/RiskCategoriesControllerTest.kt

+30-15
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,22 @@ internal class RiskCategoriesControllerTest(
4545
Response(
4646
data = RiskCategory(
4747
offenderNo = "A1234AA",
48-
assessments = listOf(RiskAssessment(classificationCode = "C")),
48+
assessments = listOf(
49+
RiskAssessment(
50+
classificationCode = "C",
51+
classification = "Cat C",
52+
assessmentCode = "CATEGORY",
53+
assessmentDescription = "Categorisation",
54+
assessmentDate = "2018-02-11",
55+
nextReviewDate = "2018-02-11",
56+
assessmentAgencyId = "MDI",
57+
assessmentStatus = "P",
58+
assessmentComment = "Comment details",
59+
),
60+
61+
),
62+
category = "string",
63+
categoryCode = "string",
4964
),
5065
),
5166
)
@@ -78,20 +93,20 @@ internal class RiskCategoriesControllerTest(
7893
"data": {
7994
"offenderNo": "A1234AA",
8095
"assessments": [
81-
{
82-
"classificationCode": "C",
83-
"classification": null,
84-
"assessmentCode": null,
85-
"assessmentDescription": null,
86-
"assessmentDate": null,
87-
"nextReviewDate": null,
88-
"assessmentAgencyId": null,
89-
"assessmentStatus": null,
90-
"assessmentComment": null
91-
}
92-
],
93-
"category": null,
94-
"categoryCode": null
96+
{
97+
"classificationCode": "C",
98+
"classification": "Cat C",
99+
"assessmentCode": "CATEGORY",
100+
"assessmentDescription": "Categorisation",
101+
"assessmentDate": "2018-02-11",
102+
"nextReviewDate": "2018-02-11",
103+
"assessmentAgencyId": "MDI",
104+
"assessmentStatus": "P",
105+
"assessmentComment": "Comment details"
106+
}
107+
],
108+
"category": "string",
109+
"categoryCode": "string"
95110
}
96111
""".removeWhitespaceAndNewlines(),
97112
)

0 commit comments

Comments
 (0)