From 75a16323ff4c2a72e3d026dd62e5b9533beba75c Mon Sep 17 00:00:00 2001 From: "Krzysztof Massalski (Extern)" Date: Fri, 2 Feb 2024 14:56:25 +0100 Subject: [PATCH] feat(impl):[#370] fix test --- .../DecentralDigitalTwinRegistryServiceWiremockTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryServiceWiremockTest.java b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryServiceWiremockTest.java index 7c6bee5b80..6594462667 100644 --- a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryServiceWiremockTest.java +++ b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryServiceWiremockTest.java @@ -58,6 +58,7 @@ import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; import com.github.tomakehurst.wiremock.junit5.WireMockTest; import org.eclipse.edc.spi.types.domain.edr.EndpointDataReference; +import org.eclipse.tractusx.irs.component.Shell; import org.eclipse.tractusx.irs.component.assetadministrationshell.AssetAdministrationShellDescriptor; import org.eclipse.tractusx.irs.registryclient.DigitalTwinRegistryKey; import org.eclipse.tractusx.irs.registryclient.discovery.ConnectorEndpointsService; @@ -103,12 +104,12 @@ void shouldDiscoverEDCAndRequestRegistry() throws RegistryServiceException { givenThat(getShellDescriptor200()); // Act - final Collection assetAdministrationShellDescriptors = decentralDigitalTwinRegistryService.fetchShells( + final Collection shells = decentralDigitalTwinRegistryService.fetchShells( List.of(new DigitalTwinRegistryKey("testId", TEST_BPN))); // Assert - assertThat(assetAdministrationShellDescriptors).hasSize(1); - assertThat(assetAdministrationShellDescriptors.stream().findFirst().get().getSubmodelDescriptors()).hasSize(3); + assertThat(shells).hasSize(1); + assertThat(shells.stream().findFirst().get().payload().getSubmodelDescriptors()).hasSize(3); verify(exactly(1), postRequestedFor(urlPathEqualTo(DISCOVERY_FINDER_PATH))); verify(exactly(1), postRequestedFor(urlPathEqualTo(EDC_DISCOVERY_PATH))); verify(exactly(1), getRequestedFor(urlPathEqualTo(LOOKUP_SHELLS_PATH)));