Skip to content

Commit

Permalink
feat(impl):[#370] fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-ext-kmassalski committed Feb 2, 2024
1 parent 7b4ad06 commit 75a1632
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -103,12 +104,12 @@ void shouldDiscoverEDCAndRequestRegistry() throws RegistryServiceException {
givenThat(getShellDescriptor200());

// Act
final Collection<AssetAdministrationShellDescriptor> assetAdministrationShellDescriptors = decentralDigitalTwinRegistryService.fetchShells(
final Collection<Shell> 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)));
Expand Down

0 comments on commit 75a1632

Please sign in to comment.