Skip to content

Commit

Permalink
[PPANTT-191] fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gioelemella committed Dec 4, 2024
1 parent 0fd74dd commit ab5a1f1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}
],
"post": {
"operationId": "createMdbPaymentOption",
"operationId": "buildMdbPaymentOption",
"requestBody": {
"content": {
"application/json": {
Expand Down Expand Up @@ -215,7 +215,7 @@
"ApiKey": []
}
],
"summary": "Create MBD payment option",
"summary": "Build MBD payment option model",
"tags": [
"MBD GPS"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public MbdGpsController(ModelMapper modelMapper) {
schema = @Schema(implementation = ProblemJson.class)))
})
@Operation(
summary = "Create MBD payment option",
summary = "Build MBD payment option model",
security = {@SecurityRequirement(name = "ApiKey")})
public @Valid MbdPaymentOptionResponse createMdbPaymentOption(
public @Valid MbdPaymentOptionResponse buildMdbPaymentOption(
@RequestBody @NotNull @Valid MbdPaymentOptionRequest mbdPaymentOptionRequest) {
return this.modelMapper.map(mbdPaymentOptionRequest, MbdPaymentOptionResponse.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class MbdGpsControllerTest {
@Autowired private ObjectMapper objectMapper;

@Test
void createMdbPaymentOptionTestSuccess() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestSuccess() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();

MvcResult result =
mvc.perform(
Expand Down Expand Up @@ -78,8 +78,8 @@ void createMdbPaymentOptionTestSuccess() throws Exception {
}

@Test
void createMdbPaymentOptionTestFailAmountMissing() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestFailAmountMissing() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();
request.getProperties().setAmount(null);

mvc.perform(
Expand All @@ -90,8 +90,8 @@ void createMdbPaymentOptionTestFailAmountMissing() throws Exception {
}

@Test
void createMdbPaymentOptionTestFailFirstNameMissing() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestFailFirstNameMissing() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();
request.getProperties().setFirstName(null);

mvc.perform(
Expand All @@ -102,8 +102,8 @@ void createMdbPaymentOptionTestFailFirstNameMissing() throws Exception {
}

@Test
void createMdbPaymentOptionTestFailLastNameMissing() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestFailLastNameMissing() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();
request.getProperties().setLastName(null);

mvc.perform(
Expand All @@ -114,8 +114,8 @@ void createMdbPaymentOptionTestFailLastNameMissing() throws Exception {
}

@Test
void createMdbPaymentOptionTestFailFiscalCodeMissing() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestFailFiscalCodeMissing() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();
request.getProperties().setFiscalCode(null);

mvc.perform(
Expand All @@ -126,8 +126,8 @@ void createMdbPaymentOptionTestFailFiscalCodeMissing() throws Exception {
}

@Test
void createMdbPaymentOptionTestFailProvincialResidenceMissing() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestFailProvincialResidenceMissing() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();
request.getProperties().setProvincialResidence(null);

mvc.perform(
Expand All @@ -138,8 +138,8 @@ void createMdbPaymentOptionTestFailProvincialResidenceMissing() throws Exception
}

@Test
void createMdbPaymentOptionTestFailDocumentHashMissing() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestFailDocumentHashMissing() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();
request.getProperties().setDocumentHash(null);

mvc.perform(
Expand All @@ -150,8 +150,8 @@ void createMdbPaymentOptionTestFailDocumentHashMissing() throws Exception {
}

@Test
void createMdbPaymentOptionTestFailDocumentHashWrongSize() throws Exception {
MbdPaymentOptionRequest request = buildMdbPaymentOptionRequest();
void buildMbdPaymentOptionTestFailDocumentHashWrongSize() throws Exception {
MbdPaymentOptionRequest request = buildMbdPaymentOptionRequest();
request.getProperties().setDocumentHash("asdfsdf");

mvc.perform(
Expand All @@ -161,7 +161,7 @@ void createMdbPaymentOptionTestFailDocumentHashWrongSize() throws Exception {
.andExpect(status().is4xxClientError());
}

private MbdPaymentOptionRequest buildMdbPaymentOptionRequest() {
private MbdPaymentOptionRequest buildMbdPaymentOptionRequest() {
return MbdPaymentOptionRequest.builder()
.properties(
MbdPaymentOptionRequestProperties.builder()
Expand Down

0 comments on commit ab5a1f1

Please sign in to comment.