Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refactor/QA-4215-Refactor-dei-Te…
Browse files Browse the repository at this point in the history
…st-Mittente-con-Gestione-dei-Bean' into refactor/QA-4069-Roadmap-per-l-Integrazione-di-Spring-dopo-l-integrazione-con-JUnit-5
  • Loading branch information
angelominisci committed Nov 5, 2024
2 parents 9f8dfaa + 54bc3d1 commit e191e78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/main/java/it/pn/frontend/e2e/rest/RestContact.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public void removeSpecialContact(DigitalAddress digitalAddress) throws RestDeleg
* Ottiene l'indirizzo digitale di default.
*/
public DigitalAddressResponse getDigitalAddress() throws RestContactException {
logger.info("TOKEN..."+System.getProperty("token"));
CustomHttpClient<?, DigitalAddressResponse> httpClientDigitalAddress = CustomHttpClient.getInstance();
httpClientDigitalAddress.setBaseUrlApi("https://webapi." + environment + ".notifichedigitali.it");
String url = "/bff/v1/addresses/LEGAL/default/PEC";
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/it/pn/frontend/e2e/rest/RestNotification.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import it.pn.frontend.e2e.model.documents.PreLoadResponse;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Assertions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.File;
Expand All @@ -20,7 +21,8 @@
public class RestNotification {
public RestNotification() {
}

@Autowired
private CustomHttpClient customHttpClient;
/**
* Create a new notification with one recipient and one document
*
Expand Down Expand Up @@ -55,7 +57,7 @@ public List<PreLoadResponse> preLoadDocument(List<PreLoadRequest> preLoadList) t
}

public void uploadDocument(String url, String secret, String sha256) throws RestNotificationException {
final CustomHttpClient<?, ?> httpClient2 = CustomHttpClient.getInstance();
final CustomHttpClient<?, ?> httpClient2 = customHttpClient;
try {
httpClient2.sendHttpUpLoadPutRequest(url, secret, sha256, null);
} catch (IOException e) {
Expand All @@ -65,7 +67,7 @@ public void uploadDocument(String url, String secret, String sha256) throws Rest
}

public void uploadDocumentF24(String url, String secret, String sha256, File metaDatiDocument) throws RestNotificationException {
final CustomHttpClient<?, ?> httpClient2 = CustomHttpClient.getInstance();
final CustomHttpClient<?, ?> httpClient2 = customHttpClient;
try {
httpClient2.sendHttpUpLoadf24PutRequest(url, secret, sha256, null, metaDatiDocument);
} catch (IOException e) {
Expand All @@ -75,7 +77,7 @@ public void uploadDocumentF24(String url, String secret, String sha256, File met
}

public LinkedTreeMap<String, Object> getNotificationStatus(String notificationRequestId) {
final CustomHttpClient<Object, Object> httpClient2 = CustomHttpClient.getInstance(); // Modifica qui
final CustomHttpClient<Object, Object> httpClient2 = customHttpClient; // Modifica qui
httpClient2.setBaseUrlApi("https://api.test.notifichedigitali.it");
try {
Object response = httpClient2.sendHttpGetRequest("/delivery/v2.3/requests?notificationRequestId=" + notificationRequestId, null, Object.class);
Expand Down

0 comments on commit e191e78

Please sign in to comment.