diff --git a/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt b/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt index 67257b767..47b42019a 100644 --- a/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt +++ b/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt @@ -26,7 +26,7 @@ import org.assertj.core.api.Assertions.assertThat import org.eclipse.tractusx.bpdm.common.dto.request.AddressPartnerBpnSearchRequest import org.eclipse.tractusx.bpdm.common.dto.request.PaginationRequest import org.eclipse.tractusx.bpdm.common.dto.request.SiteBpnSearchRequest -import org.eclipse.tractusx.bpdm.common.dto.response.LogisticAddressResponse +import org.eclipse.tractusx.bpdm.common.dto.response.LogisticAddressVerboseDto import org.eclipse.tractusx.bpdm.gate.api.client.GateClient import org.eclipse.tractusx.bpdm.gate.api.model.* import org.eclipse.tractusx.bpdm.gate.api.model.request.AddressGateInputRequest @@ -37,8 +37,8 @@ import org.eclipse.tractusx.bpdm.gate.api.model.response.SharingStateDto import org.eclipse.tractusx.bpdm.pool.api.client.PoolApiClient import org.eclipse.tractusx.bpdm.pool.api.model.request.ChangelogSearchRequest import org.eclipse.tractusx.bpdm.pool.api.model.request.LegalEntityPropertiesSearchRequest -import org.eclipse.tractusx.bpdm.pool.api.model.response.LegalEntityMatchResponse -import org.eclipse.tractusx.bpdm.pool.api.model.response.SitePoolResponse +import org.eclipse.tractusx.bpdm.pool.api.model.response.LegalEntityMatchVerboseDto +import org.eclipse.tractusx.bpdm.pool.api.model.response.SitePoolVerboseDto import org.junit.jupiter.api.* import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.context.SpringBootTest @@ -247,7 +247,7 @@ class BridgeSyncIT @Autowired constructor( return sharingStatesOkay } - private fun assertEqualLegalEntity(gateVersion: LegalEntityGateInputRequest, poolVersion: LegalEntityMatchResponse) { + private fun assertEqualLegalEntity(gateVersion: LegalEntityGateInputRequest, poolVersion: LegalEntityMatchVerboseDto) { assertThat(poolVersion.legalEntity.legalShortName).isEqualTo(gateVersion.legalEntity.legalShortName) // assertThat(poolVersion.legalAddress.name).isEqualTo(gateVersion.legalAddress.nameParts.first()) assertThat(poolVersion.legalAddress.physicalPostalAddress.street?.name).isEqualTo(gateVersion.legalAddress.physicalPostalAddress.street?.name) @@ -257,12 +257,12 @@ class BridgeSyncIT @Autowired constructor( assertThat(poolVersion.legalAddress.alternativePostalAddress?.baseAddress?.city).isEqualTo(gateVersion.legalAddress.alternativePostalAddress?.baseAddress?.city) } - private fun assertEqualSite(gateVersion: SiteGateInputRequest, poolVersion: SitePoolResponse) { + private fun assertEqualSite(gateVersion: SiteGateInputRequest, poolVersion: SitePoolVerboseDto) { assertThat(poolVersion.site.name).isEqualTo(gateVersion.site.nameParts.first()) assertThat(poolVersion.site.states.map { it.description }).isEqualTo(gateVersion.site.states.map { it.description }) } - private fun assertEqualAddress(gateVersion: AddressGateInputRequest, poolVersion: LogisticAddressResponse) { + private fun assertEqualAddress(gateVersion: AddressGateInputRequest, poolVersion: LogisticAddressVerboseDto) { assertThat(poolVersion.name).isEqualTo(gateVersion.address.nameParts.first()) assertThat(poolVersion.physicalPostalAddress.street?.name).isEqualTo(gateVersion.address.physicalPostalAddress.street?.name) assertThat(poolVersion.physicalPostalAddress.baseAddress.city).isEqualTo(gateVersion.address.physicalPostalAddress.baseAddress.city) diff --git a/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/testdata/GateRequestValues.kt b/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/testdata/GateRequestValues.kt index 0fdce6359..d09b86f81 100644 --- a/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/testdata/GateRequestValues.kt +++ b/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/testdata/GateRequestValues.kt @@ -20,9 +20,6 @@ package com.catenax.bpdm.bridge.dummy.testdata import org.eclipse.tractusx.bpdm.common.dto.* -import org.eclipse.tractusx.bpdm.common.dto.saas.IdentifierSaas -import org.eclipse.tractusx.bpdm.common.dto.saas.TypeKeyNameSaas -import org.eclipse.tractusx.bpdm.common.dto.saas.TypeKeyNameUrlSaas import org.eclipse.tractusx.bpdm.gate.api.model.LogisticAddressGateDto import org.eclipse.tractusx.bpdm.gate.api.model.PhysicalPostalAddressGateDto import org.eclipse.tractusx.bpdm.gate.api.model.SiteGateDto @@ -33,13 +30,6 @@ import org.eclipse.tractusx.bpdm.gate.api.model.request.SiteGateInputRequest object GateRequestValues { - val identifierSass1 = IdentifierSaas( - type = TypeKeyNameUrlSaas(technicalKey = CommonValues.identifierTypeTechnicalKey1), - value = CommonValues.identifierValue1, - issuingBody = TypeKeyNameUrlSaas(name = CommonValues.identifierIssuingBodyName1), - status = TypeKeyNameSaas(technicalKey = CommonValues.identifierStatusTechnicalKey1) - ) - val identifier1 = LegalEntityIdentifierDto( value = CommonValues.identifierValue1, @@ -329,7 +319,7 @@ object GateRequestValues { address = address1.copy( nameParts = listOf(CommonValues.name1), identifiers = listOf( - AddressIdentifierDto(identifierSass1.value!!, identifierSass1.type?.technicalKey!!) + AddressIdentifierDto(CommonValues.identifierValue1, CommonValues.identifierTypeTechnicalKey1) ) ), externalId = CommonValues.externalIdAddress1, @@ -341,7 +331,7 @@ object GateRequestValues { address = address2.copy( nameParts = listOf(CommonValues.name2), identifiers = listOf( - AddressIdentifierDto(identifierSass1.value!!, identifierSass1.type?.technicalKey!!) + AddressIdentifierDto(CommonValues.identifierValue2, CommonValues.identifierTypeTechnicalKey2) ) ), externalId = CommonValues.externalIdAddress2,