Skip to content

Commit

Permalink
feat(GRP Tester): golden record tester application with some test sce…
Browse files Browse the repository at this point in the history
…narios
  • Loading branch information
SujitMBRDI committed Sep 16, 2024
1 parent 0fee91e commit f280829
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copyWithSiteMainAddress(PostalAddress.empty)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -128,6 +133,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copyWithSiteMainAddress(PostalAddress.empty)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -156,6 +166,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -183,6 +198,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -210,6 +230,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -237,6 +262,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -264,6 +294,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithSiteMainAddress(null)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand All @@ -290,6 +325,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithSiteMainAddress(null)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand All @@ -316,6 +356,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null, additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -343,6 +388,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null, additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,9 @@ object BusinessPartnerVerboseValues {
industrialZone = "industrial-zone",
building = "building",
floor = "floor",
door = "door"
door = "door",
taxJurisdictionCode = "123"

),
alternativePostalAddress = AlternativePostalAddressDto(
geographicCoordinates = GeoCoordinateDto(0.6, 0.6, 0.6),
Expand Down

0 comments on commit f280829

Please sign in to comment.