Skip to content

Commit 0df1607

Browse files
committed
DTSPB-4896 change getCase to getCaseByCaseId
1 parent 5120203 commit 0df1607

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/main/java/uk/gov/hmcts/probate/core/service/BusinessServiceImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import uk.gov.hmcts.probate.core.service.mapper.ExecutorApplyingToInvitationMapper;
99
import uk.gov.hmcts.probate.service.BusinessService;
1010
import uk.gov.hmcts.reform.probate.model.PhonePin;
11-
import uk.gov.hmcts.reform.probate.model.ProbateType;
1211
import uk.gov.hmcts.reform.probate.model.cases.CaseType;
1312
import uk.gov.hmcts.reform.probate.model.cases.CollectionMember;
1413
import uk.gov.hmcts.reform.probate.model.cases.ProbateCaseDetails;
@@ -333,8 +332,7 @@ public String getPinNumber(PhonePin phonePin, String sessionId, Boolean isBiling
333332
private ProbateCaseDetails getProbateCaseDetails(String caseId) {
334333
String serviceAuthorisation = securityUtils.getServiceAuthorisation();
335334
String authorisation = securityUtils.getAuthorisation();
336-
return submitServiceApi.getCase(authorisation, serviceAuthorisation,
337-
caseId, ProbateType.PA.getCaseType().name());
335+
return submitServiceApi.getCaseById(authorisation, serviceAuthorisation, caseId);
338336
}
339337

340338
private void updateCaseData(ProbateCaseDetails probateCaseDetails, String formdataId) {

src/test/java/uk/gov/hmcts/probate/core/service/BusinessServiceImplTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import uk.gov.hmcts.probate.client.submit.SubmitServiceApi;
1414
import uk.gov.hmcts.probate.core.service.mapper.ExecutorApplyingToInvitationMapper;
1515
import uk.gov.hmcts.reform.probate.model.PhonePin;
16-
import uk.gov.hmcts.reform.probate.model.ProbateType;
1716
import uk.gov.hmcts.reform.probate.model.cases.CaseInfo;
1817
import uk.gov.hmcts.reform.probate.model.cases.CaseType;
1918
import uk.gov.hmcts.reform.probate.model.cases.CollectionMember;
@@ -88,8 +87,8 @@ public void setUp() throws Exception {
8887
when(securityUtils.getAuthorisation()).thenReturn(AUTHORIZATION);
8988
when(securityUtils.getServiceAuthorisation()).thenReturn(SERVICE_AUTHORIZATION);
9089

91-
when(submitServiceApi.getCase(AUTHORIZATION, SERVICE_AUTHORIZATION,
92-
formdataId, ProbateType.PA.getCaseType().name())).thenReturn(mockProbateCaseDetails);
90+
when(submitServiceApi.getCaseById(AUTHORIZATION, SERVICE_AUTHORIZATION,
91+
formdataId)).thenReturn(mockProbateCaseDetails);
9392
when(mockProbateCaseDetails.getCaseData()).thenReturn(mockGrantOfRepresentationData);
9493
when(mockProbateCaseDetails.getCaseInfo()).thenReturn(mockCaseInfo);
9594
when(mockCaseInfo.getCaseId()).thenReturn("123456789101112");
@@ -594,8 +593,9 @@ public void shouldGetAllInviteData() {
594593
}
595594

596595
private void verifyGetCaseCalls() {
597-
verify(submitServiceApi).getCase(AUTHORIZATION, SERVICE_AUTHORIZATION,
598-
formdataId, ProbateType.PA.getCaseType().name());
596+
597+
verify(submitServiceApi).getCaseById(AUTHORIZATION, SERVICE_AUTHORIZATION,
598+
formdataId);
599599
verify(mockProbateCaseDetails).getCaseData();
600600
}
601601

0 commit comments

Comments
 (0)