Skip to content

Выполнено ФЗ 16 - #1

Merged
internet-prodashi merged 7 commits into
mainfrom
add-item-requests-and-gateway
Sep 18, 2025
Merged

Выполнено ФЗ 16#1
internet-prodashi merged 7 commits into
mainfrom
add-item-requests-and-gateway

Conversation

@internet-prodashi

Copy link
Copy Markdown
Owner

No description provided.

import static org.mockito.Mockito.when;

@ExtendWith(MockitoExtension.class)
public class TestBookingClient {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше бы конечно Test писать в постфиксе, но это вкусовщина конечно. Так просто чуть легче ориентироваться)


@WebMvcTest(controllers = BookingController.class)
class TestBookingController {
@Autowired

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Было бы неплохо поля отделять пропуском строки друг от друга еще

@ResponseStatus(HttpStatus.OK)
@PatchMapping("/{bookingId}")
public BookingDtoResponse approve(
@RequestHeader(value = "X-Sharer-User-Id") @Positive Long userId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X-Sharer-User-Id можно еще вынести в константу, чтобы везде к ней обращаться, чтобы не опечататься случайно и чтобы помогал авто-комплит самой IDE)

@internet-prodashi
internet-prodashi merged commit 6720760 into main Sep 18, 2025
2 checks passed
@internet-prodashi
internet-prodashi deleted the add-item-requests-and-gateway branch September 18, 2025 19:42
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.

2 participants