Skip to content

Commit

Permalink
NOD-642 fix conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsca committed Feb 1, 2024
1 parent cf7d354 commit 00da2f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public interface PspsServiceServiceMapper {
List<FdrPaymentInsertEntity> toFdrPaymentInsertEntityList(List<PaymentDto> paymentDto);

@Mapping(target = "published", ignore = true)
@Mapping(target = "refJson", ignore = true)
FdrPublishEntity toFdrPublishEntity(FdrInsertEntity fdrInsertEntity);

List<FdrPaymentPublishEntity> toFdrPaymentPublishEntityList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
class InternalOrganizationResourceTest {

private static final String GET_ALL_PUBLISHED_FLOW_URL =
"/internal/organizations/ndp/fdrs?" + AppConstant.PSP + "=%s";
"/internal/organizations/%s/fdrs?" + AppConstant.PSP + "=%s";
private static final String GET_REPORTING_FLOW_URL =
"/internal/organizations/%s/fdrs/%s/revisions/%s/psps/%s";
private static final String GET_REPORTING_FLOW_PAYMENTS_URL =
Expand All @@ -48,7 +48,7 @@ class InternalOrganizationResourceTest {
void testOrganization_getAllPublishedFlow_Ok() {
String flowName = TestUtil.getDynamicFlowName();
TestUtil.pspSunnyDay(flowName);
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(PSP_CODE);
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(EC_CODE, PSP_CODE);
GetAllResponse res =
given()
.header(HEADER)
Expand All @@ -71,7 +71,7 @@ void testOrganization_getAllPublishedFlow_Ok() {
void testOrganization_getAllPublishedFlow_OkNoResults() {
String flowName = TestUtil.getDynamicFlowName();
TestUtil.pspSunnyDay(flowName);
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(PSP_CODE_2);
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(EC_CODE, PSP_CODE_2);
GetAllResponse res =
given()
.header(HEADER)
Expand All @@ -88,7 +88,7 @@ void testOrganization_getAllPublishedFlow_OkNoResults() {
@DisplayName("ORGANIZATIONS - KO FDR-0708 - psp unknown")
void testOrganization_getAllPublishedFlow_KO_FDR0708() {
String pspUnknown = "PSP_UNKNOWN";
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(pspUnknown);
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(EC_CODE, pspUnknown);
ErrorResponse res =
given()
.header(HEADER)
Expand All @@ -110,7 +110,7 @@ void testOrganization_getAllPublishedFlow_KO_FDR0708() {
@Test
@DisplayName("ORGANIZATIONS - KO FDR-0709 - psp not enabled")
void testOrganization_getAllPublishedFlow_KO_FDR0709() {
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(PSP_CODE_NOT_ENABLED);
String url = GET_ALL_PUBLISHED_FLOW_URL.formatted(EC_CODE, PSP_CODE_NOT_ENABLED);

ErrorResponse res =
given()
Expand Down Expand Up @@ -181,7 +181,7 @@ void testOrganization_getReportingFlow_KO_FDR0701() {
TestUtil.pspSunnyDay(flowName);

String flowNameWrong = TestUtil.getDynamicFlowName();
String url = GET_REPORTING_FLOW_URL.formatted(EC_CODE_NDP, flowNameWrong, 1, PSP_CODE);
String url = GET_REPORTING_FLOW_URL.formatted(EC_CODE, flowNameWrong, 1, PSP_CODE);

ErrorResponse res =
given()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class AppConstantTestHelper {
public static final String CHANNEL_CODE_NOT_ENABLED = "CANALE_NOT_ENABLED";
public static final String EC_CODE = "15376371009";
public static final String EC_CODE_NOT_ENABLED = "PAtestDOFF";
public static final String EC_CODE_NDP = "ndp";

public static final Header HEADER = new Header("Content-Type", "application/json");
}

0 comments on commit 00da2f8

Please sign in to comment.