Skip to content

Commit

Permalink
P4ADEV-2005 added activity skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
macacia committed Feb 5, 2025
1 parent 9b11212 commit b64b287
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package it.gov.pagopa.payhub.activities.activity.paymentsreporting;

import io.temporal.activity.ActivityInterface;
import io.temporal.activity.ActivityMethod;
import it.gov.pagopa.pu.pagopapayments.dto.generated.PaymentsReportingIdDTO;

import java.util.List;

/**
* Interface for retrieving the payments reporting files from PagoPA.
*/
@ActivityInterface
public interface OrganizationPaymentsReportingPagoPaFileRetrieverActivity {
/**
* Retrieves the payments reporting files from PagoPA.
*
* @param paymentsReportingIds the list of payments reporting IDs
* @return a list of ingestion flow file IDs
*/
@ActivityMethod
List<Long> getPaymentsReportingFile(List<PaymentsReportingIdDTO> paymentsReportingIds);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package it.gov.pagopa.payhub.activities.activity.paymentsreporting;

import it.gov.pagopa.pu.pagopapayments.dto.generated.PaymentsReportingIdDTO;

import java.util.List;

public class OrganizationPaymentsReportingPagoPaFileRetrieverActivityImpl implements OrganizationPaymentsReportingPagoPaFileRetrieverActivity {

@Override
public List<Long> getPaymentsReportingFile(List<PaymentsReportingIdDTO> paymentsReportingIds) {


return List.of();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package it.gov.pagopa.payhub.activities.activity.paymentsreporting;

import it.gov.pagopa.pu.pagopapayments.dto.generated.PaymentsReportingIdDTO;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.List;

import static org.junit.jupiter.api.Assertions.*;

class OrganizationPaymentsReportingPagoPaFileRetrieverActivityTest {
private OrganizationPaymentsReportingPagoPaFileRetrieverActivity activity;

@BeforeEach
void setUp() {
activity = new OrganizationPaymentsReportingPagoPaFileRetrieverActivityImpl();
}

@Test
void getPaymentsReportingFile() {
// Given
List<PaymentsReportingIdDTO> paymentsReportingIds = List.of();

// When Then
assertDoesNotThrow(() -> activity.getPaymentsReportingFile(paymentsReportingIds));
}
}

0 comments on commit b64b287

Please sign in to comment.