Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTSCCI-570 adding case title om carm csv #5118

Merged
merged 16 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
9fc2673
DTSCCI-570 adding case title om carm csv
rishikrsharma Jul 18, 2024
54ea433
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
ruban72 Jul 18, 2024
106509c
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Jul 22, 2024
4927389
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
rishikrsharma Jul 26, 2024
08b86d0
DTSCCI-570 adding case title om carm csv
rishikrsharma Jul 26, 2024
9cb33cf
DTSCCI-570 adding case title om carm csv
rishikrsharma Jul 26, 2024
31c3259
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
rishikrsharma Jul 31, 2024
4431974
DTSCCI-570 adding case title om carm csv
rishikrsharma Jul 31, 2024
af65f50
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Aug 4, 2024
d19b02e
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Aug 5, 2024
0926def
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Aug 5, 2024
3136d09
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Aug 5, 2024
1a2a94e
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Aug 5, 2024
3fcfa58
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
ed14537 Aug 6, 2024
0a1a3f9
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Aug 6, 2024
9cf0b5f
Merge branch 'master' into DTSCCI-570-adding-casetitle-on-csv-for-carm
kdaHMCTS Aug 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ private String generateCSVRow(String[] row) {

private String[] getCSVHeaders() {
return new String[] {"SITE_ID", "CASE_TYPE", "CHECK_LIST", "PARTY_STATUS", "CASE_NUMBER", "AMOUNT", "PARTY_TYPE",
"COMPANY_NAME", "CONTACT_NAME", "CONTACT_NUMBER", "CONTACT_EMAIL", "PILOT"};
"COMPANY_NAME", "CONTACT_NAME", "CONTACT_NUMBER", "CONTACT_EMAIL", "PILOT", "CASE_TITLE"};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ private String getCSVContent(MediationParams params) {
getCsvCompanyName(data.getApplicant1()), applicantContactDetails.getApplicantContactName(params),
applicantContactDetails.getApplicantContactNumber(params),
applicantContactDetails.getApplicantContactEmail(params),
isPilot(data.getTotalClaimAmount())
isPilot(data.getTotalClaimAmount()),
data.getCaseNamePublic()
};

String[] respondentData = {
SITE_ID, CASE_TYPE, CHECK_LIST, PARTY_STATUS, data.getLegacyCaseReference(), totalClaimAmount, RESPONDENT,
getCsvCompanyName(data.getRespondent1()), defendantContactDetails.getDefendantContactName(params),
defendantContactDetails.getDefendantContactNumber(params),
defendantContactDetails.getDefendantContactEmail(params),
isPilot(data.getTotalClaimAmount())
isPilot(data.getTotalClaimAmount()),
data.getCaseNamePublic()
};
return generateCSVRow(claimantData)
+ generateCSVRow(respondentData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import static org.assertj.core.api.Assertions.assertThat;

@ExtendWith(MockitoExtension.class)
public class MediationCSVLipVLipServiceTest {
class MediationCSVLipVLipServiceTest {

@InjectMocks
private MediationCSVLipVLipService service;
Expand All @@ -37,9 +37,10 @@ public class MediationCSVLipVLipServiceTest {
private static final String ID = "123456789";
private static final String RESPONDENT = "2";
private static final String APPLICANT = "1";
private static final String CASE_TITLE = APPLICANT_INDIVIDUAL_FIRST_NAME.concat(" v ").concat(RESPONDENT_INDIVIDUAL_FIRST_NAME);

private void assertCSVContent(String result, String partyId, String partyName, String partyPhoneNumber, String partyEmailAddress) {
assertThat(result).contains(ID, partyId, partyName, partyPhoneNumber, partyEmailAddress, TOTAL_AMOUNT);
assertThat(result).contains(ID, partyId, partyName, partyPhoneNumber, partyEmailAddress, TOTAL_AMOUNT, CASE_TITLE);
}

private Party buildParty(Party.Type partyType, String companyName, String phoneNumber, String emailAddress,
Expand Down Expand Up @@ -68,6 +69,7 @@ private CaseData getCaseData(Party.Type partyType) {
.respondent1(buildParty(partyType, RESPONDENT_COMPANY_NAME, RESPONDENT_PHONE_NUMBER, RESPONDENT_EMAIL_ADDRESS,
RESPONDENT_INDIVIDUAL_FIRST_NAME, RESPONDENT_INDIVIDUAL_LAST_NAME,
RESPONDENT_SOLE_TRADER_FIRST_NAME, RESPONDENT_SOLE_TRADER_LAST_NAME, RESPONDENT_ORGANISATION_NAME))
.caseNamePublic(CASE_TITLE)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static org.mockito.BDDMockito.given;

@ExtendWith(MockitoExtension.class)
public class MediationCSVLrvLipServiceTest {
class MediationCSVLrvLipServiceTest {

@InjectMocks
private MediationCSVLrvLipService service;
Expand All @@ -49,8 +49,10 @@ public class MediationCSVLrvLipServiceTest {
private static final String RESPONDENT = "2";
private static final String APPLICANT = "1";

private static final String CASE_TITLE = "Applicant company name".concat(" v ").concat(RESPONDENT_INDIVIDUAL_FIRST_NAME);

private void assertCSVContent(String result, String partyId, String partyName, String partyPhoneNumber, String partyEmailAddress) {
assertThat(result).contains(ID, partyId, partyName, partyPhoneNumber, partyEmailAddress, TOTAL_AMOUNT);
assertThat(result).contains(ID, partyId, partyName, partyPhoneNumber, partyEmailAddress, TOTAL_AMOUNT, CASE_TITLE);
}

private Party buildParty(Party.Type partyType, String companyName, String phoneNumber, String emailAddress,
Expand Down Expand Up @@ -82,6 +84,7 @@ private CaseData getCaseData(Party.Type partyType) {
.build())
.applicantSolicitor1ClaimStatementOfTruth(StatementOfTruth.builder().name(LR_COMPANY_NAME).build())
.applicantSolicitor1UserDetails(IdamUserDetails.builder().email(LR_COMPANY_EMAIL).build())
.caseNamePublic(CASE_TITLE)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import static org.mockito.BDDMockito.given;

@ExtendWith(MockitoExtension.class)
public class MediationCSVLrvLrServiceTest {
class MediationCSVLrvLrServiceTest {

@InjectMocks
private MediationCSVLrvLrService service;
Expand Down Expand Up @@ -97,6 +97,7 @@ private CaseData getCaseData(Party.Type partyType) {
.totalClaimAmount(new BigDecimal(TOTAL_AMOUNT))
.applicant1(applicantParty)
.respondent1(respondentParty)
.caseNamePublic(applicantParty.getPartyName().concat(" v ").concat(respondentParty.getPartyName()))
.applicant1OrganisationPolicy(OrganisationPolicy.builder()
.organisation(Organisation.builder().organisationID(APP_LR_ORG_ID).build())
.build())
Expand Down Expand Up @@ -124,7 +125,10 @@ void shouldContainApplicantLRContactDetails() {
String result = service.generateCSVContent(caseData);

// Then
assertContainsDetails(result, LR_APPLICANT_COMPANY_NAME, LR_APPLICANT_COMPANY_EMAIL, LR_APPLICANT_COMPANY_NUMBER);
assertContainsDetails(result, LR_APPLICANT_COMPANY_NAME,
LR_APPLICANT_COMPANY_EMAIL,
LR_APPLICANT_COMPANY_NUMBER,
APPLICANT_COMPANY_NAME.concat(" v ").concat(RESPONDENT_COMPANY_NAME));
}

@Test
Expand Down
Loading