From 40fd2cedf41c4b70a51090a4e3d50b71da06b706 Mon Sep 17 00:00:00 2001 From: RHJ5FE Date: Mon, 28 Aug 2023 11:22:13 +0200 Subject: [PATCH] initial revision --- .../controller/AssetAdministrationShellApiDelegate.java | 1 - .../registry/AbstractAssetAdministrationShellApi.java | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java b/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java index 9dfe02c7..ab5ed1e1 100644 --- a/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java +++ b/backend/src/main/java/org/eclipse/tractusx/semantics/registry/controller/AssetAdministrationShellApiDelegate.java @@ -94,7 +94,6 @@ public ResponseEntity getAllAssetA } @Override - // new todo: correct implementation public ResponseEntity getAllSubmodelDescriptorsThroughSuperpath( byte[] aasIdentifier, Integer limit, String cursor, @RequestHeader String externalSubjectId ) { Shell savedShell = shellService.findShellByExternalIdAndExternalSubjectId(getDecodedId( aasIdentifier ),getExternalSubjectIdOrEmpty(externalSubjectId)); SubmodelCollectionDto dto = shellService.findAllSubmodel( limit,cursor, savedShell); diff --git a/backend/src/test/java/org/eclipse/tractusx/semantics/registry/AbstractAssetAdministrationShellApi.java b/backend/src/test/java/org/eclipse/tractusx/semantics/registry/AbstractAssetAdministrationShellApi.java index c74c9b1a..51d58050 100644 --- a/backend/src/test/java/org/eclipse/tractusx/semantics/registry/AbstractAssetAdministrationShellApi.java +++ b/backend/src/test/java/org/eclipse/tractusx/semantics/registry/AbstractAssetAdministrationShellApi.java @@ -40,7 +40,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; -// TODO: Include also checking the expected content which is currently commented @SpringBootTest @AutoConfigureMockMvc @EnableConfigurationProperties( RegistryProperties.class) @@ -88,8 +87,8 @@ protected void performSubmodelCreateRequest(String payload, String shellIdentifi .with(jwtTokenFactory.allRoles()) ) .andDo(MockMvcResultHandlers.print()) - .andExpect(status().isCreated()); - // .andExpect(content().json(payload)); + .andExpect(status().isCreated()) + .andExpect(content().json(payload)); } /** @@ -117,8 +116,8 @@ protected void performShellCreateRequest(String payload, String expectation) thr .with(jwtTokenFactory.allRoles()) ) .andDo(MockMvcResultHandlers.print()) - .andExpect(status().isCreated()); - // .andExpect(content().json(expectation)); + .andExpect(status().isCreated()) + .andExpect(content().json(expectation)); }