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

Feature/pn 11232 bis #501

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
78 changes: 26 additions & 52 deletions src/test/java/it/pagopa/pn/cucumber/steps/DataTableTypeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

import java.util.*;

import static it.pagopa.pn.cucumber.steps.utilitySteps.ThreadUtils.threadWaitMilliseconds;
import static it.pagopa.pn.cucumber.steps.utilitySteps.ThreadUtils.threadWaitSeconds;
import static it.pagopa.pn.cucumber.utils.NotificationValue.*;


Expand Down Expand Up @@ -52,11 +54,8 @@ public synchronized NewNotificationRequestV23 convertNotificationRequest(Map<Str

notificationRequest = addDocument(notificationRequest,data);

try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
threadWaitSeconds(2);

return notificationRequest;
}

Expand Down Expand Up @@ -132,11 +131,9 @@ public synchronized it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externa
it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externalb2bpa.model_v1.NewNotificationRequest.PagoPaIntModeEnum.SYNC :
it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externalb2bpa.model_v1.NewNotificationRequest.PagoPaIntModeEnum.NONE )))
);
try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}

threadWaitSeconds(2);

return notificationRequestV1;
}

Expand Down Expand Up @@ -171,11 +168,9 @@ public synchronized it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externa
it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externalb2bpa.model_v2.NewNotificationRequest.PagoPaIntModeEnum.SYNC :
it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externalb2bpa.model_v2.NewNotificationRequest.PagoPaIntModeEnum.NONE )))
);
try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}

threadWaitSeconds(2);

return notificationRequestV2;
}

Expand Down Expand Up @@ -217,11 +212,8 @@ public synchronized it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externa
//.vat(getValue(data, VAT.key) == null ? null : Integer.parseInt(getValue(data, VAT.key)))


try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
threadWaitSeconds(2);

return notificationRequest;
}

Expand Down Expand Up @@ -263,12 +255,8 @@ public synchronized NotificationRecipientV23 convertNotificationRecipient(Map<St
if (getValue(data,PAYMENT.key)!= null && getValue(data,PAYMENT_MULTY_NUMBER.key)!= null && !getValue(data,PAYMENT_MULTY_NUMBER.key).isEmpty()){
listPayment = new ArrayList<NotificationPaymentItem>();
for (int i = 0; i < Integer.parseInt(getValue(data, PAYMENT_MULTY_NUMBER.key)); i++) {
try {
Thread.sleep(1000);
}
catch (InterruptedException exc) {
throw new RuntimeException(exc);
}
threadWaitMilliseconds(1000);

NotificationPaymentItem addPaymentsItem = new NotificationPaymentItem();
addPaymentsItem.pagoPa(getValue(data, PAYMENT_PAGOPA_FORM.key) == null ? null :
(getValue(data, PAYMENT_PAGOPA_FORM.key).equalsIgnoreCase("NO") ?
Expand Down Expand Up @@ -328,11 +316,8 @@ public synchronized NotificationRecipientV23 convertNotificationRecipient(Map<St
}

*/
try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
threadWaitSeconds(2);

return notificationRecipient;
}

Expand Down Expand Up @@ -474,11 +459,8 @@ public synchronized it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externa
}

*/
try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
threadWaitSeconds(2);

return notificationRecipient;
}

Expand Down Expand Up @@ -533,11 +515,9 @@ public synchronized it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externa
}

*/
try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}

threadWaitSeconds(2);

return notificationRecipientV2;
}

Expand Down Expand Up @@ -578,12 +558,9 @@ public synchronized it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externa
if (getValue(data,PAYMENT.key)!= null && getValue(data,PAYMENT_MULTY_NUMBER.key)!= null && !getValue(data,PAYMENT_MULTY_NUMBER.key).isEmpty()){
listPayment = new ArrayList<it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externalb2bpa.model_v21.NotificationPaymentItem>();
for (int i = 0; i < Integer.parseInt(getValue(data, PAYMENT_MULTY_NUMBER.key)); i++) {
try {
Thread.sleep(1000);
}
catch (InterruptedException exc) {
throw new RuntimeException(exc);
}

threadWaitMilliseconds(1000);

it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externalb2bpa.model_v21.NotificationPaymentItem addPaymentsItem = new it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externalb2bpa.model_v21.NotificationPaymentItem();
addPaymentsItem.pagoPa(getValue(data, PAYMENT_PAGOPA_FORM.key) == null ? null :
(getValue(data, PAYMENT_PAGOPA_FORM.key).equalsIgnoreCase("NO") ?
Expand Down Expand Up @@ -616,11 +593,8 @@ public synchronized it.pagopa.pn.client.b2b.pa.generated.openapi.clients.externa
notificationRecipient.setPayments(listPayment);
}

try {
Thread.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
threadWaitSeconds(2);

return notificationRecipient;
}

Expand Down
Loading
Loading