-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* P4PU-200 added mapper * P4PU-200 renamed mapper * P4PU-200 fixed Utilities * P4PU-200 added faker * P4PU-200 added junit tests * P4PU-200 updated annotation from @service to @component
- Loading branch information
1 parent
d18e0b5
commit 674f278
Showing
24 changed files
with
673 additions
and
8 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/it/gov/pagopa/arc/dto/mapper/BizEventsCartItem2CartItemDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsCartItemDTO; | ||
import it.gov.pagopa.arc.model.generated.CartItemDTO; | ||
import it.gov.pagopa.arc.utils.Utilities; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class BizEventsCartItem2CartItemDTO { | ||
private final BizEventsUserDetail2UserDetailDTO userDetailsMapper; | ||
|
||
public BizEventsCartItem2CartItemDTO(BizEventsUserDetail2UserDetailDTO userDetailsMapper) { | ||
this.userDetailsMapper = userDetailsMapper; | ||
} | ||
|
||
public CartItemDTO mapCart(BizEventsCartItemDTO bizEventsCartItemDTO){ | ||
return CartItemDTO.builder() | ||
.subject(bizEventsCartItemDTO.getSubject()) | ||
.amount(bizEventsCartItemDTO.getAmount() != null ? Utilities.euroToCents(bizEventsCartItemDTO.getAmount()) : null) | ||
.payee(userDetailsMapper.mapUserDetail(bizEventsCartItemDTO.getPayee())) | ||
.debtor(userDetailsMapper.mapUserDetail(bizEventsCartItemDTO.getDebtor())) | ||
.refNumberType(bizEventsCartItemDTO.getRefNumberType()) | ||
.refNumberValue(bizEventsCartItemDTO.getRefNumberValue()) | ||
.build(); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/it/gov/pagopa/arc/dto/mapper/BizEventsInfoTransaction2InfoTransactionDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsInfoTransactionDTO; | ||
import it.gov.pagopa.arc.connector.bizevents.enums.PaymentMethod; | ||
import it.gov.pagopa.arc.model.generated.InfoTransactionDTO; | ||
import it.gov.pagopa.arc.utils.Utilities; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class BizEventsInfoTransaction2InfoTransactionDTO { | ||
private final BizEventsWalletInfo2WalletInfoDTO walletInfoMapper; | ||
private final BizEventsUserDetail2UserDetailDTO userDetailsMapper; | ||
public BizEventsInfoTransaction2InfoTransactionDTO(BizEventsWalletInfo2WalletInfoDTO walletInfoMapper, BizEventsUserDetail2UserDetailDTO userDetailsMapper) { | ||
this.walletInfoMapper = walletInfoMapper; | ||
this.userDetailsMapper = userDetailsMapper; | ||
} | ||
|
||
public InfoTransactionDTO mapInfoTransaction(BizEventsInfoTransactionDTO bizEventsInfoTransactionDTO){ | ||
PaymentMethod paymentMethod = null; | ||
if(bizEventsInfoTransactionDTO.getPaymentMethod() != null) { | ||
paymentMethod = bizEventsInfoTransactionDTO.getPaymentMethod(); | ||
} | ||
return InfoTransactionDTO.builder() | ||
.transactionId(bizEventsInfoTransactionDTO.getTransactionId()) | ||
.authCode(bizEventsInfoTransactionDTO.getAuthCode()) | ||
.rrn(bizEventsInfoTransactionDTO.getRrn()) | ||
.transactionDate(bizEventsInfoTransactionDTO.getTransactionDate() != null ? Utilities.dateStringToZonedDateTime(bizEventsInfoTransactionDTO.getTransactionDate()) : null) | ||
.pspName(bizEventsInfoTransactionDTO.getPspName()) | ||
.walletInfo(bizEventsInfoTransactionDTO.getBizEventsWalletInfoDTO() != null ? walletInfoMapper.mapWalletInfo(bizEventsInfoTransactionDTO.getBizEventsWalletInfoDTO()) : null ) | ||
.paymentMethod(paymentMethod != null ? PaymentMethodEnumMapper.paymentMethodEnumMap.get(paymentMethod) : null) | ||
.payer(bizEventsInfoTransactionDTO.getPayer() != null ? userDetailsMapper.mapUserDetail(bizEventsInfoTransactionDTO.getPayer()) : null) | ||
.amount(bizEventsInfoTransactionDTO.getAmount() != null ? Utilities.euroToCents(bizEventsInfoTransactionDTO.getAmount()) : null) | ||
.fee(bizEventsInfoTransactionDTO.getFee() != null ? Utilities.euroToCents(bizEventsInfoTransactionDTO.getFee()) : null) | ||
.origin(OriginEnumMapper.originEnumMap.get(bizEventsInfoTransactionDTO.getOrigin())) | ||
.build(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../java/it/gov/pagopa/arc/dto/mapper/BizEventsTransactionDetails2TransactionDetailsDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsTransactionDetailsDTO; | ||
import it.gov.pagopa.arc.model.generated.CartItemDTO; | ||
import it.gov.pagopa.arc.model.generated.TransactionDetailsDTO; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.List; | ||
|
||
@Component | ||
public class BizEventsTransactionDetails2TransactionDetailsDTO { | ||
private final BizEventsInfoTransaction2InfoTransactionDTO transactionInfoMapper; | ||
|
||
public BizEventsTransactionDetails2TransactionDetailsDTO(BizEventsInfoTransaction2InfoTransactionDTO transactionInfoMapper) { | ||
this.transactionInfoMapper = transactionInfoMapper; | ||
} | ||
|
||
public TransactionDetailsDTO apply(BizEventsTransactionDetailsDTO bizEventsTransactionDetailsDTO, List<CartItemDTO> cartsList){ | ||
return TransactionDetailsDTO.builder() | ||
.infoTransaction(transactionInfoMapper.mapInfoTransaction(bizEventsTransactionDetailsDTO.getBizEventsInfoTransactionDTO())) | ||
.carts(cartsList) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/it/gov/pagopa/arc/dto/mapper/BizEventsUserDetail2UserDetailDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsUserDetailDTO; | ||
import it.gov.pagopa.arc.model.generated.UserDetailDTO; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class BizEventsUserDetail2UserDetailDTO { | ||
|
||
public UserDetailDTO mapUserDetail(BizEventsUserDetailDTO bizEventsUserDetailDTO){ | ||
return UserDetailDTO.builder() | ||
.name(bizEventsUserDetailDTO.getName()) | ||
.taxCode(bizEventsUserDetailDTO.getTaxCode()) | ||
.build(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/it/gov/pagopa/arc/dto/mapper/BizEventsWalletInfo2WalletInfoDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsWalletInfoDTO; | ||
import it.gov.pagopa.arc.model.generated.WalletInfoDTO; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class BizEventsWalletInfo2WalletInfoDTO { | ||
|
||
public WalletInfoDTO mapWalletInfo(BizEventsWalletInfoDTO bizEventsWalletInfoDTO){ | ||
return WalletInfoDTO.builder() | ||
.accountHolder(bizEventsWalletInfoDTO.getAccountHolder()) | ||
.brand(bizEventsWalletInfoDTO.getBrand()) | ||
.blurredNumber(bizEventsWalletInfoDTO.getBlurredNumber()) | ||
.maskedEmail(bizEventsWalletInfoDTO.getMaskedEmail()) | ||
.build(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/it/gov/pagopa/arc/dto/mapper/OriginEnumMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.enums.Origin; | ||
import it.gov.pagopa.arc.model.generated.InfoTransactionDTO; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.EnumMap; | ||
import java.util.Map; | ||
|
||
@Component | ||
public class OriginEnumMapper { | ||
private OriginEnumMapper(){} | ||
protected static final Map<Origin, InfoTransactionDTO.OriginEnum> originEnumMap; | ||
|
||
static { | ||
originEnumMap = new EnumMap<>(Origin.class); | ||
originEnumMap.put(Origin.INTERNAL, InfoTransactionDTO.OriginEnum.INTERNAL); | ||
originEnumMap.put(Origin.PM, InfoTransactionDTO.OriginEnum.PM); | ||
originEnumMap.put(Origin.NDP001PROD, InfoTransactionDTO.OriginEnum.NDP001PROD); | ||
originEnumMap.put(Origin.NDP002PROD, InfoTransactionDTO.OriginEnum.NDP002PROD); | ||
originEnumMap.put(Origin.NDP003PROD, InfoTransactionDTO.OriginEnum.NDP003PROD); | ||
originEnumMap.put(Origin.UNKNOWN, InfoTransactionDTO.OriginEnum.UNKNOWN); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/it/gov/pagopa/arc/dto/mapper/PaymentMethodEnumMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.enums.PaymentMethod; | ||
import it.gov.pagopa.arc.model.generated.InfoTransactionDTO; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.EnumMap; | ||
import java.util.Map; | ||
|
||
@Component | ||
public class PaymentMethodEnumMapper { | ||
private PaymentMethodEnumMapper(){} | ||
protected static final Map<PaymentMethod, InfoTransactionDTO.PaymentMethodEnum> paymentMethodEnumMap; | ||
|
||
static { | ||
paymentMethodEnumMap = new EnumMap<>(PaymentMethod.class); | ||
paymentMethodEnumMap.put(PaymentMethod.BBT, InfoTransactionDTO.PaymentMethodEnum.BBT); | ||
paymentMethodEnumMap.put(PaymentMethod.BP, InfoTransactionDTO.PaymentMethodEnum.BP); | ||
paymentMethodEnumMap.put(PaymentMethod.AD, InfoTransactionDTO.PaymentMethodEnum.AD); | ||
paymentMethodEnumMap.put(PaymentMethod.CP, InfoTransactionDTO.PaymentMethodEnum.CP); | ||
paymentMethodEnumMap.put(PaymentMethod.PO, InfoTransactionDTO.PaymentMethodEnum.PO); | ||
paymentMethodEnumMap.put(PaymentMethod.OBEP, InfoTransactionDTO.PaymentMethodEnum.OBEP); | ||
paymentMethodEnumMap.put(PaymentMethod.JIF, InfoTransactionDTO.PaymentMethodEnum.JIF); | ||
paymentMethodEnumMap.put(PaymentMethod.MYBK, InfoTransactionDTO.PaymentMethodEnum.MYBK); | ||
paymentMethodEnumMap.put(PaymentMethod.PPAL, InfoTransactionDTO.PaymentMethodEnum.PPAL); | ||
paymentMethodEnumMap.put(PaymentMethod.UNKNOWN, InfoTransactionDTO.PaymentMethodEnum.UNKNOWN); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/test/java/it/gov/pagopa/arc/dto/mapper/BizEventsCartItem2CartItemDTOTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsCartItemDTO; | ||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsUserDetailDTO; | ||
import it.gov.pagopa.arc.fakers.CommonUserDetailDTOFaker; | ||
import it.gov.pagopa.arc.fakers.bizEvents.BizEventsCartItemDTOFaker; | ||
import it.gov.pagopa.arc.model.generated.CartItemDTO; | ||
import it.gov.pagopa.arc.model.generated.UserDetailDTO; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.Mockito; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
import static org.mockito.ArgumentMatchers.any; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
class BizEventsCartItem2CartItemDTOTest { | ||
|
||
private BizEventsCartItem2CartItemDTO cartItemMapper; | ||
|
||
@Mock | ||
private BizEventsUserDetail2UserDetailDTO userDetailsMapperMock; | ||
|
||
@BeforeEach | ||
void setUp() { | ||
cartItemMapper = new BizEventsCartItem2CartItemDTO(userDetailsMapperMock); | ||
} | ||
|
||
@Test | ||
void givenBizEventsCartItemDTOWhenMapCartThenReturnCartItemDTO() { | ||
//given | ||
BizEventsUserDetailDTO payee = CommonUserDetailDTOFaker.mockBizEventsUserDetailDTO(CommonUserDetailDTOFaker.USER_DETAIL_PAYEE); | ||
|
||
BizEventsUserDetailDTO debtor = CommonUserDetailDTOFaker.mockBizEventsUserDetailDTO(CommonUserDetailDTOFaker.USER_DETAIL_DEBTOR); | ||
|
||
UserDetailDTO payeeResponse = UserDetailDTO.builder() | ||
.name("ACI Automobile Club Italia") | ||
.taxCode("00493410583") | ||
.build(); | ||
|
||
UserDetailDTO debtorResponse = UserDetailDTO.builder() | ||
.name("DEBTOR") | ||
.taxCode("TAX_CODE") | ||
.build(); | ||
|
||
Mockito.when(userDetailsMapperMock.mapUserDetail(payee)).thenReturn(payeeResponse); | ||
Mockito.when(userDetailsMapperMock.mapUserDetail(debtor)).thenReturn(debtorResponse); | ||
|
||
BizEventsCartItemDTO cartItemDTO = BizEventsCartItemDTOFaker.mockInstance(payee,debtor); | ||
//when | ||
CartItemDTO result = cartItemMapper.mapCart(cartItemDTO); | ||
//then | ||
assertNotNull(result); | ||
assertEquals("pagamento", result.getSubject()); | ||
assertEquals(545230L, result.getAmount()); | ||
assertEquals(payeeResponse, result.getPayee()); | ||
assertEquals(debtorResponse, result.getDebtor()); | ||
assertEquals("960000000094659945", result.getRefNumberValue()); | ||
assertEquals("IUV", result.getRefNumberType()); | ||
Mockito.verify(userDetailsMapperMock, Mockito.times(2)).mapUserDetail(any()); | ||
} | ||
} |
94 changes: 94 additions & 0 deletions
94
...st/java/it/gov/pagopa/arc/dto/mapper/BizEventsInfoTransaction2InfoTransactionDTOTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
package it.gov.pagopa.arc.dto.mapper; | ||
|
||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsInfoTransactionDTO; | ||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsUserDetailDTO; | ||
import it.gov.pagopa.arc.connector.bizevents.dto.BizEventsWalletInfoDTO; | ||
import it.gov.pagopa.arc.connector.bizevents.enums.Origin; | ||
import it.gov.pagopa.arc.fakers.CommonUserDetailDTOFaker; | ||
import it.gov.pagopa.arc.fakers.CommonWalletInfoDTOFaker; | ||
import it.gov.pagopa.arc.fakers.bizEvents.BizEventsInfoTransactionDTOFaker; | ||
import it.gov.pagopa.arc.model.generated.InfoTransactionDTO; | ||
import it.gov.pagopa.arc.model.generated.UserDetailDTO; | ||
import it.gov.pagopa.arc.model.generated.WalletInfoDTO; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.Mockito; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
import java.time.ZonedDateTime; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
import static org.mockito.ArgumentMatchers.any; | ||
@ExtendWith(MockitoExtension.class) | ||
class BizEventsInfoTransaction2InfoTransactionDTOTest { | ||
private BizEventsInfoTransaction2InfoTransactionDTO transactionInfoMapper; | ||
@Mock | ||
private BizEventsWalletInfo2WalletInfoDTO walletInfoMapperMock; | ||
@Mock | ||
private BizEventsUserDetail2UserDetailDTO userDetailsMapperMock; | ||
|
||
@BeforeEach | ||
void setUp() { | ||
transactionInfoMapper = new BizEventsInfoTransaction2InfoTransactionDTO(walletInfoMapperMock, userDetailsMapperMock); | ||
} | ||
|
||
@Test | ||
void givenBizEventsInfoTransactionDTOWhenMapInfoTransactionThenReturnInfoTransactionDTO() { | ||
//given | ||
BizEventsWalletInfoDTO bizEventsWalletInfo = CommonWalletInfoDTOFaker.mockBizEventsWalletInfoDTO(false); | ||
BizEventsUserDetailDTO payer = CommonUserDetailDTOFaker.mockBizEventsUserDetailDTO(CommonUserDetailDTOFaker.USER_DETAIL_PAYER); | ||
BizEventsInfoTransactionDTO bizEventsInfoTransaction = BizEventsInfoTransactionDTOFaker.mockInstance(bizEventsWalletInfo, payer); | ||
WalletInfoDTO walletInfo = CommonWalletInfoDTOFaker.mockWalletInfoDTO(false); | ||
UserDetailDTO payerMapped = CommonUserDetailDTOFaker.mockUserDetailDTO(CommonUserDetailDTOFaker.USER_DETAIL_PAYER); | ||
|
||
Mockito.when(walletInfoMapperMock.mapWalletInfo(bizEventsWalletInfo)).thenReturn(walletInfo); | ||
Mockito.when(userDetailsMapperMock.mapUserDetail(any())).thenReturn(payerMapped); | ||
|
||
//when | ||
InfoTransactionDTO result = transactionInfoMapper.mapInfoTransaction(bizEventsInfoTransaction); | ||
//then | ||
commonAssert(result); | ||
|
||
assertEquals(walletInfo, result.getWalletInfo()); | ||
assertEquals(InfoTransactionDTO.PaymentMethodEnum.PO, result.getPaymentMethod()); | ||
assertEquals(payerMapped, result.getPayer()); | ||
Mockito.verify(walletInfoMapperMock).mapWalletInfo(any()); | ||
Mockito.verify(userDetailsMapperMock).mapUserDetail(any()); | ||
} | ||
|
||
@Test | ||
void givenBizEventsInfoTransactionDTOWithoutPayerWhenMapInfoTransactionThenReturnInfoTransactionDTO() { | ||
//given | ||
BizEventsInfoTransactionDTO bizEventsInfoTransaction = BizEventsInfoTransactionDTO.builder() | ||
.transactionId("TRANSACTION_ID") | ||
.authCode("250863") | ||
.rrn("51561651") | ||
.transactionDate("2024-06-27T13:07:25Z") | ||
.pspName("Worldline Merchant Services Italia S.p.A.") | ||
.amount("5.654,3") | ||
.fee("0,29") | ||
.origin(Origin.PM) | ||
.build(); | ||
|
||
//when | ||
InfoTransactionDTO result = transactionInfoMapper.mapInfoTransaction(bizEventsInfoTransaction); | ||
|
||
//then | ||
commonAssert(result); | ||
} | ||
|
||
private static void commonAssert(InfoTransactionDTO result) { | ||
assertNotNull(result); | ||
assertEquals("TRANSACTION_ID", result.getTransactionId()); | ||
assertEquals("250863", result.getAuthCode()); | ||
assertEquals("51561651", result.getRrn()); | ||
assertEquals(ZonedDateTime.parse("2024-06-27T13:07:25Z"), result.getTransactionDate()); | ||
assertEquals("Worldline Merchant Services Italia S.p.A.", result.getPspName()); | ||
assertEquals( 565430L, result.getAmount()); | ||
assertEquals( 29L, result.getFee()); | ||
assertEquals(InfoTransactionDTO.OriginEnum.PM, result.getOrigin()); | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/test/java/it/gov/pagopa/arc/dto/mapper/BizEventsTransactionDTO2TransactionDTOTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.