Skip to content

Commit

Permalink
feat: adjusted permission search criteria to align to svc (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter authored Mar 4, 2024
1 parent c4ff98d commit 83b6b32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/main/openapi/openapi-bff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,10 @@ components:
properties:
appId:
type: string
productName:
type: string
productNames:
type: array
items:
type: string
pageNumber:
format: int32
description: The number of page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ void searchPermissionsByCriteriaTest() {

PermissionSearchCriteria criteria = new PermissionSearchCriteria();
criteria.pageNumber(1).appId("app1").pageSize(1);
criteria.setProductNames(List.of("product1"));

PermissionPageResult pageResult = new PermissionPageResult();
Permission permission = new Permission();
permission.appId("app1").action("delete").id("id1");
permission.setProductName("product1");
pageResult.stream(List.of(permission)).size(1).number(1).totalElements(1L).totalPages(1L);

// create mock rest endpoint
Expand All @@ -53,7 +55,7 @@ void searchPermissionsByCriteriaTest() {
.withBody(JsonBody.json(pageResult)));

PermissionSearchCriteriaDTO criteriaDTO = new PermissionSearchCriteriaDTO();
criteriaDTO.pageNumber(1).appId("app1").pageSize(1);
criteriaDTO.pageNumber(1).appId("app1").pageSize(1).productNames(List.of("product1"));

var output = given()
.when()
Expand Down

0 comments on commit 83b6b32

Please sign in to comment.