Skip to content

Commit

Permalink
CIV-8923 Refactoring tempAddress to tempCorrespondence (#3568)
Browse files Browse the repository at this point in the history
CIV-8923 specAoSApplicantCorrespondenceAddressdetails is being updated when defendant updates address
  • Loading branch information
UshaPanneerselvam1 authored Nov 14, 2023
1 parent f8969cd commit ef0198c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1363,9 +1363,9 @@ private CallbackResponse setApplicantResponseDeadline(CallbackParams callbackPar
AllocatedTrack allocatedTrack = caseData.getAllocatedTrack();
Party updatedRespondent1;

if (NO.equals(caseData.getTempAddress1Required())) {
if (NO.equals(caseData.getTempCorrespondenceAddress1Required())) {
updatedRespondent1 = caseData.getRespondent1().toBuilder()
.primaryAddress(caseData.getTempAddress1()).build();
.primaryAddress(caseData.getTempCorrespondenceAddress1()).build();
} else {
updatedRespondent1 = caseData.getRespondent1().toBuilder()
.primaryAddress(caseData.getRespondent1Copy().getPrimaryAddress())
Expand Down Expand Up @@ -1578,9 +1578,9 @@ && isAwaitingAnotherDefendantResponse(caseData)) {
private static Party applyRespondent2Address(CaseData caseData, CaseData.CaseDataBuilder<?, ?> updatedData) {
Party updatedRespondent2;

if (NO.equals(caseData.getTempAddress2Required())) {
if (NO.equals(caseData.getTempCorrespondenceAddress2Required())) {
updatedRespondent2 = caseData.getRespondent2().toBuilder()
.primaryAddress(caseData.getTempAddress2()).build();
.primaryAddress(caseData.getTempCorrespondenceAddress2()).build();
} else {
updatedRespondent2 = caseData.getRespondent2().toBuilder()
.primaryAddress(caseData.getRespondent2Copy().getPrimaryAddress()).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,19 +726,19 @@ public boolean isApplicantNotRepresented() {
/**
* used to temporary hold addresses.
*/
private final Address tempAddress1;
private final Address tempCorrespondenceAddress1;
/**
* used with tempAddress1.
* used with tempCorrespondenceAddress1.
*/
private final YesOrNo tempAddress1Required;
private final YesOrNo tempCorrespondenceAddress1Required;
/**
* used to temporary hold addresses.
*/
private final Address tempAddress2;
private final Address tempCorrespondenceAddress2;
/**
* used with tempAddress1.
* used with tempCorrespondenceAddress2.
*/
private final YesOrNo tempAddress2Required;
private final YesOrNo tempCorrespondenceAddress2Required;

@JsonIgnore
public boolean isResponseAcceptedByClaimant() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,8 @@ void updateRespondent1AddressWhenUpdated() {
.respondent1(PartyBuilder.builder().individual().build())
.atStateApplicantRespondToDefenceAndProceed()
.build().toBuilder()
.tempAddress1Required(NO)
.tempAddress1(AddressBuilder.maximal().build())
.tempCorrespondenceAddress1Required(NO)
.tempCorrespondenceAddress1(AddressBuilder.maximal().build())
.build();

CallbackParams params = callbackParamsOf(caseData, ABOUT_TO_SUBMIT);
Expand Down Expand Up @@ -829,11 +829,11 @@ void updateRespondent2AddressWhenUpdated() {
.respondent2(PartyBuilder.builder().individual().build())
.respondent2Copy(PartyBuilder.builder().individual().build())
.build().toBuilder()
.tempAddress1Required(YES)
.tempAddress1(Address.builder().build())
.tempCorrespondenceAddress1Required(YES)
.tempCorrespondenceAddress1(Address.builder().build())
.build().toBuilder()
.tempAddress2Required(NO)
.tempAddress2(newAddress2)
.tempCorrespondenceAddress2Required(NO)
.tempCorrespondenceAddress2(newAddress2)
.respondentSolicitor2ServiceAddressRequired(NO)
.respondentSolicitor2ServiceAddress(newAddress2)
.build();
Expand Down Expand Up @@ -906,12 +906,12 @@ void defendantResponsePopulatesWitnessesData() {
.respondent1DQWitnessesSmallClaim(res1witnesses)
.respondent2DQWitnessesSmallClaim(res2witnesses)
.build().toBuilder()
.tempAddress1Required(YES)
.tempAddress1(Address.builder().build())
.tempCorrespondenceAddress1Required(YES)
.tempCorrespondenceAddress1(Address.builder().build())
.respondent2ResponseDate(dateTime)
.respondent1ResponseDate(dateTime).build().toBuilder()
.tempAddress2Required(NO)
.tempAddress2(AddressBuilder.maximal().build())
.tempCorrespondenceAddress2Required(NO)
.tempCorrespondenceAddress2(AddressBuilder.maximal().build())
.build();

CallbackParams params = callbackParamsOf(caseData, ABOUT_TO_SUBMIT);
Expand Down Expand Up @@ -1729,7 +1729,7 @@ void shouldUpdateCorrespondence1_whenProvided1v2ss_withSameResponse_withv2copyAn
.build())
.respondent2Copy(PartyBuilder.builder().individual().build())
.respondent2SameLegalRepresentative(YES)
.tempAddress2Required(NO)
.tempCorrespondenceAddress2Required(NO)
.build();

CallbackParams params = callbackParamsOf(caseData, ABOUT_TO_SUBMIT);
Expand Down

0 comments on commit ef0198c

Please sign in to comment.