Skip to content

Commit

Permalink
feat(bridge-tests): Tests for syncing new legal entities, site & addr…
Browse files Browse the repository at this point in the history
…esses eclipse-tractusx#210

- ignore legal and main addresses on sync
  • Loading branch information
rainer-exxcellent committed Aug 22, 2023
1 parent f006a4c commit d3e69b8
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ class BridgeSyncIT @Autowired constructor(
bridgeClient.bridge().triggerSync()

// 3 legal entities + 3 legal addresses
assertPoolChangelogHasCount(3 + 3 + 3)
assertPoolChangelogHasCount(3 + 3)

// 3 legal entities
val sharingStatesOkay = assertSharingStatesSuccessful(6)
val sharingStatesOkay = assertSharingStatesSuccessful(3)
val bpnByExternalId = buildBpnByExternalIdMap(sharingStatesOkay)

val gateLegalEntityRequestByBpn = gateLegalEntityRequests.associateBy { bpnByExternalId[it.externalId]!! }
Expand Down Expand Up @@ -370,10 +370,10 @@ class BridgeSyncIT @Autowired constructor(
assertThat(poolVersion.alternativePostalAddress?.baseAddress?.city).isEqualTo(gateVersion.address.alternativePostalAddress?.baseAddress?.city)

// 3 legal entities + 3 legal addresses & 2 sites + 2 main addresses
assertPoolChangelogHasCount(3 * 2 + 2 * 2 + 5)
assertPoolChangelogHasCount(3 + 3 + 2 + 2)

// 3 LEs + 2 sites
val sharingStatesOkay = assertSharingStatesSuccessful(3 + 2 + 5)
val sharingStatesOkay = assertSharingStatesSuccessful(3 + 2)
val bpnByExternalId = buildBpnByExternalIdMap(sharingStatesOkay)

val gateSiteRequestsByBpn = gateSiteRequests.associateBy { bpnByExternalId[it.externalId]!! }
Expand Down Expand Up @@ -420,10 +420,10 @@ class BridgeSyncIT @Autowired constructor(
bridgeClient.bridge().triggerSync()

// 1 legal entity + 1 legal address & 1 site + 1 main address & 2 addresses
assertPoolChangelogHasCount(1 * 2 + 1 * 2 + 2 + 2)
assertPoolChangelogHasCount(1 + 1 + 1 + 1 + 2)

// 1 LE + 1 site + 2 addresses
val sharingStatesOkay = assertSharingStatesSuccessful(1 + 1 + 2 + 2)
val sharingStatesOkay = assertSharingStatesSuccessful(1 + 1 + 2)
val bpnByExternalId = buildBpnByExternalIdMap(sharingStatesOkay)

val gateAddressRequestsByBpn = gateAddressRequests.associateBy { bpnByExternalId[it.externalId]!! }
Expand Down

0 comments on commit d3e69b8

Please sign in to comment.