Skip to content

Commit 6d4bfd3

Browse files
ronaldo-macapobreRonaldo Macapobre
andauthored
Include SNT as part of ContinuationReasonCodes so that related appearances would show there instead from OtherSeized (#877)
Co-authored-by: Ronaldo Macapobre <ronaldo.macapobre@gov.bc.ca>
1 parent 40d44c1 commit 6d4bfd3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

api/Services/CaseService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ public class CaseService(
3434
public const string DECISION_APPR_REASON_CD = "DEC";
3535
public const string CONTINUATION_APPR_REASON_CD = "CNT";
3636
public const string ADDTL_CNT_TIME_APPR_REASON_CD = "ACT";
37+
public const string SENTENCE_HEARING_APPR_REASON_CD = "SNT";
3738

3839
public const string SEIZED_RESTRICTION_CD = "S";
3940
public const string ASSIGNED_RESTRICTION_CD = "G";
4041

4142
public static readonly ImmutableArray<string> ContinuationReasonCodes = [
4243
DECISION_APPR_REASON_CD,
4344
CONTINUATION_APPR_REASON_CD,
44-
ADDTL_CNT_TIME_APPR_REASON_CD
45+
ADDTL_CNT_TIME_APPR_REASON_CD,
46+
SENTENCE_HEARING_APPR_REASON_CD
4547
];
4648

4749
public override Task<OperationResult<CaseDto>> ValidateAsync(CaseDto dto, bool isEdit = false)

tests/api/Services/CaseServiceTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ public async Task GetAssignedCasesAsync_MixedRestrictionCodes_CategorizedCorrect
320320
CreateCase(CaseService.CONTINUATION_APPR_REASON_CD, CaseService.ASSIGNED_RESTRICTION_CD),
321321
CreateCase("UNKNOWN", CaseService.SEIZED_RESTRICTION_CD),
322322
CreateCase("UNKNOWN", CaseService.ASSIGNED_RESTRICTION_CD),
323-
CreateCase(null, CaseService.SEIZED_RESTRICTION_CD)
323+
CreateCase(null, CaseService.SEIZED_RESTRICTION_CD),
324+
CreateCase(CaseService.SENTENCE_HEARING_APPR_REASON_CD, CaseService.SEIZED_RESTRICTION_CD)
324325
};
325326

326327
_mockRepo.Setup(r => r.FindAsync(It.IsAny<Expression<Func<Case, bool>>>()))
@@ -330,7 +331,7 @@ public async Task GetAssignedCasesAsync_MixedRestrictionCodes_CategorizedCorrect
330331

331332
Assert.True(result.Succeeded);
332333
Assert.Equal(2, result.Payload.ReservedJudgments.Count); // 1 DEC (S) + 1 reserved
333-
Assert.Equal(2, result.Payload.ScheduledContinuations.Count); // DEC (S), CNT (S)
334+
Assert.Equal(3, result.Payload.ScheduledContinuations.Count); // DEC (S), CNT (S), SNT (S)
334335
Assert.Single(result.Payload.Others); // UNKNOWN (S)
335336
Assert.Equal(3, result.Payload.FutureAssigned.Count); // All with restriction G
336337
}

0 commit comments

Comments
 (0)