Skip to content

auto-gen: SDK changes (52d00ff7) - #435

Draft
Diego Barajas (barajas-d) wants to merge 1 commit into
masterfrom
auto-gen/52d00ff7-generic
Draft

Diego Barajas (barajas-d) wants to merge 1 commit into
masterfrom
auto-gen/52d00ff7-generic

Conversation

@barajas-d

Copy link
Copy Markdown
Contributor

Automated code generation.

generation_id: 52d00ff7-4863-43f9-90fb-6715648a49ba

Review required before merge.

@barajas-d

Copy link
Copy Markdown
Contributor Author

Automated reviewer warnings

This pull request was created with the following advisory findings. Review them before merging:

  • [REQ-04] Rewrite the request construction in StoreClientTest to use types that actually exist: StoreCreateRequest.builder().name(...).businessHours(StoreCreateRequest.BusinessHours.builder().monday(StoreCreateRequest.DayHours.builder().open("08:00").close("15:00").build()).build()).location(StoreCreateRequest.Location.builder()....build()).build(); do not create new request classes (additive-only file set is fixed by the plan). (src/test/java/com/mercadopago/client/store/StoreClientTest.java): StoreCreateRequest defines nested Location/City/State/BusinessHours/DayHours only; grep of diff shows no StoreBusinessHoursRequest/StoreOpeningHoursRequest/StoreLocationRequest/StoreCityRequest files.
  • [REQ-04] Align the test with the implemented public signature: call searchStores with the user id (e.g. new StoreClient().searchStores(539675046L, new MPSearchRequest(30, 0))), assert on the MPResponse content/status, and remove the unused filters/HashMap and unresolved ResultsStoresPage reference. (src/test/java/com/mercadopago/client/store/StoreClientTest.java): StoreClient declares public MPResponse searchStores(Long userId, MPSearchRequest searchRequest[, MPRequestOptions]); test invokes searchStores(new MPSearchRequest(30, 0)) and assigns to ResultsStoresPage. Also unused Map<String,Object> filters = new HashMap<>().
  • [REQ-04] Update the tests to the implemented signatures: updateStore(539675046L, 960798L, request) and deleteStore(539675046L, 960798L), asserting MPResponse status/content for delete instead of Store fields. (src/test/java/com/mercadopago/client/store/StoreClientTest.java): StoreClient declares updateStore(Long userId, Long storeId, StoreUpdateRequest[, MPRequestOptions]) and MPResponse deleteStore(Long userId, Long storeId[, MPRequestOptions]).
  • [REQ-04] Correct the test constants to point at the written mock resources (e.g. include the mocks segment consistently, e.g. STORE_BASE_JSON="/mocks/response/store/store_base.json" and STORE_ALL_JSON="/mocks/response/store/store_all.json", matching the repository's mock-loading convention used by MockHelper), so each path resolves to a written file. (src/test/java/com/mercadopago/client/store/StoreClientTest.java): Mock files exist only under mocks/response/store/ and mocks/request/store/; no /response/... or /store/... resources were added, and request mocks store_base.json/store_update.json are never referenced.
  • [REQ-04] Split assertions per operation: createStoreSuccess should expect HttpStatus.CREATED; searchStoresSuccess should assert against the store_all.json payload (ids 4488810/4488811, date_creation fields) rather than the shared base constants. (src/test/java/com/mercadopago/client/store/StoreClientTest.java): createStoreSuccess mocks HttpStatus.CREATED but shared assertStoreFields hardcodes assertEquals(HttpStatus.OK, store.getResponse().getStatusCode()); store_all.json uses ids 4488810/4488811 and date_creation while assertStoreFields expects 960798 and date_created format.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant