Skip to content

Commit

Permalink
Merge branch 'master' into SSCSSI-421-requestTranslationFromWLU
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayparekh-hmcts authored Nov 14, 2024
2 parents 879ef2c + 745006c commit 32cc4ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ java:
HMC_API_URL: "http://hmc-cft-hearing-service-aat.service.core-compute-aat.internal"
#Messaging
HMC_HEARINGS_TOPIC_NAME: "hmc-to-cft-aat"
HMC_HEARINGS_TOPIC_SUBSCRIPTION_NAME: "hmc-to-sscs-subscription-pr-3858"
HMC_HEARINGS_TOPIC_SUBSCRIPTION_NAME: "hmc-to-sscs-subscription-pr-4120"
TRIBUNALS_EVENT_QUEUE_NAME: "${SERVICE_NAME}-servicebus-tribunals-to-hearing-api"
TRIBUNALS_EVENT_QUEUE_POLICY_NAME: "RootManageSharedAccessKey"
TRIBUNALS_EVENT_QUEUE_NAMESPACE: "sscs-sb-preview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import uk.gov.hmcts.reform.sscs.ccd.domain.SscsCaseData;
import uk.gov.hmcts.reform.sscs.ccd.presubmit.PreSubmitCallbackHandler;
import uk.gov.hmcts.reform.sscs.ccd.service.CcdCallbackMapService;
import uk.gov.hmcts.reform.sscs.ccd.service.CcdService;
import uk.gov.hmcts.reform.sscs.ccd.service.UpdateCcdCaseService;
import uk.gov.hmcts.reform.sscs.idam.IdamService;
import uk.gov.hmcts.reform.sscs.util.SscsUtil;

Expand All @@ -33,7 +33,7 @@
public class PostHearingReviewSubmittedHandler implements PreSubmitCallbackHandler<SscsCaseData> {
private final CcdCallbackMapService ccdCallbackMapService;

private final CcdService ccdService;
private final UpdateCcdCaseService updateCcdCaseService;

private final IdamService idamService;

Expand Down Expand Up @@ -90,7 +90,8 @@ public PreSubmitCallbackResponse<SscsCaseData> handle(CallbackType callbackType,
}

private void handleSetAsideRefusedSor(SscsCaseData caseData) {
ccdService.updateCase(caseData, Long.valueOf(caseData.getCcdCaseId()),

updateCcdCaseService.triggerCaseEventV2(Long.valueOf(caseData.getCcdCaseId()),
EventType.SOR_REQUEST.getCcdType(), "Send to hearing Judge for statement of reasons", "",
idamService.getIdamTokens());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
import uk.gov.hmcts.reform.sscs.ccd.domain.StatementOfReasonsActions;
import uk.gov.hmcts.reform.sscs.ccd.domain.YesNo;
import uk.gov.hmcts.reform.sscs.ccd.service.CcdCallbackMapService;
import uk.gov.hmcts.reform.sscs.ccd.service.CcdService;
import uk.gov.hmcts.reform.sscs.ccd.service.UpdateCcdCaseService;
import uk.gov.hmcts.reform.sscs.idam.IdamService;

@ExtendWith(MockitoExtension.class)
Expand All @@ -68,7 +68,7 @@ class PostHearingReviewSubmittedHandlerTest {
@Mock
private CcdCallbackMapService ccdCallbackMapService;
@Mock
private CcdService ccdService;
private UpdateCcdCaseService updateCcdCaseService;

@Mock
private IdamService idamService;
Expand All @@ -84,7 +84,7 @@ class PostHearingReviewSubmittedHandlerTest {

@BeforeEach
void setUp() {
handler = new PostHearingReviewSubmittedHandler(ccdCallbackMapService, ccdService, idamService, true);
handler = new PostHearingReviewSubmittedHandler(ccdCallbackMapService, updateCcdCaseService, idamService, true);

caseData = SscsCaseData.builder()
.schedulingAndListingFields(SchedulingAndListingFields.builder()
Expand Down Expand Up @@ -125,7 +125,7 @@ void givenAInvalidCallbackType_thenReturnFalse() {

@Test
void givenPostHearingsEnabledFalse_thenReturnFalse() {
handler = new PostHearingReviewSubmittedHandler(ccdCallbackMapService, ccdService, idamService, false);
handler = new PostHearingReviewSubmittedHandler(ccdCallbackMapService, updateCcdCaseService, idamService, false);
when(callback.getEvent()).thenReturn(POST_HEARING_REVIEW);
assertThat(handler.canHandle(SUBMITTED, callback)).isFalse();
}
Expand Down Expand Up @@ -169,7 +169,7 @@ void givenActionTypeSetAsideSelectedIsNotRefuse_shouldNotUpdateCaseWIthCcdServic
verify(ccdCallbackMapService, times(1))
.handleCcdCallbackMapV2(eq(action), anyLong(), isA(Consumer.class));

verifyNoInteractions(ccdService);
verifyNoInteractions(updateCcdCaseService);
}

@ParameterizedTest
Expand Down Expand Up @@ -245,8 +245,7 @@ void givenRefusedSetAsideSelected_andStatementOfReasonsRequested_whenCcdCallback
verify(ccdCallbackMapService, times(1))
.handleCcdCallbackMapV2(eq(REFUSE_SOR), anyLong(), isA(Consumer.class));

verify(ccdService, times(1)).updateCase(returnedCase,
Long.valueOf(returnedCase.getCcdCaseId()),
verify(updateCcdCaseService, times(1)).triggerCaseEventV2(Long.valueOf(returnedCase.getCcdCaseId()),
EventType.SOR_REQUEST.getCcdType(),
"Send to hearing Judge for statement of reasons",
"",
Expand Down

0 comments on commit 32cc4ff

Please sign in to comment.