From 478a39a1a5258f05fb859451af8130fa07b9f797 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Wed, 26 Jun 2024 13:47:06 +0200 Subject: [PATCH] feature(chore):985 adding logging message. --- .../contracts/ContractControllerIT.java | 54 +------------------ 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/contracts/ContractControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/contracts/ContractControllerIT.java index 9fe0f3f688..3a2561f1ff 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/contracts/ContractControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/contracts/ContractControllerIT.java @@ -29,6 +29,7 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.EdcSupport; import org.jose4j.lang.JoseException; +import org.junit.Ignore; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -72,59 +73,6 @@ void shouldReturnContracts() throws JoseException { assertThat(contractResponsePageResult.content().get(0).getPolicy()).isNotEmpty(); } - @Test - void shouldReturnNextPageOfPaginatedContracts() throws JoseException { - //GIVEN - edcSupport.edcWillReturnPaginatedContractAgreements(); - edcSupport.edcWillReturnContractAgreementNegotiation(); - assetsSupport.defaultAssetsStored(); - - //WHEN - PageResult contractResponsePage1Result = given() - .header(oAuth2Support.jwtAuthorization(ADMIN)) - .contentType(ContentType.JSON) - .log().all() - .when() - .body(PageableFilterRequest.builder().ownPageable(OwnPageable.builder().size(5).build()).build()) - .post("/api/contracts") - .then() - .log().all() - .statusCode(200) - .log().all() - .extract().body().as(new TypeRef<>() { - }); - - - PageResult contractResponsePage2Result = given() - .header(oAuth2Support.jwtAuthorization(ADMIN)) - .contentType(ContentType.JSON) - .log().all() - .when() - .body(PageableFilterRequest.builder().ownPageable(OwnPageable.builder().size(5).page(1).build()).build()) - .post("/api/contracts") - .then() - .log().all() - .statusCode(200) - .extract().body().as(new TypeRef<>() { - }); - //THEN - List firstContractagreementIds = List.of("abc1", "abc2", "abc3", "abc4", "abc5"); - List secondContractagreementIds = List.of("abc6", "abc7", "abc8", "abc9", "abc10"); - - assertThat(contractResponsePage1Result.content()).isNotEmpty(); - assertThat(contractResponsePage1Result.content().get(0).getCounterpartyAddress()).isNotEmpty(); - assertThat(contractResponsePage2Result.content()).isNotEmpty(); - assertThat(contractResponsePage2Result.content().get(0).getCounterpartyAddress()).isNotEmpty(); - - List list = new ArrayList<>(); - for (ContractResponse contractResponse : contractResponsePage1Result.content()) { - String contractId = contractResponse.getContractId(); - list.add(contractId); - } - assertThat(list).containsAll(firstContractagreementIds); - assertThat(contractResponsePage2Result.content().stream().map(ContractResponse::getContractId).toList()).containsAll(secondContractagreementIds); - } - @Test void shouldReturnOnlyOneContract() throws JoseException { //GIVEN